SOLVED

Excel

Brass Contributor

I have a worksheet that contains a 'button´ and a 'drop-down list'.

When the 'button' is clicked, it runs a macro that deletes the content of a set of specific cells.

When the drop-down list changes a different macro is run.

I need the drop-down list to run it´s macro and then to automatically run the macro that is attached to the button.

 

My instinct tells me that, even at my novice level, this should be easy to accomplish, but I cannot find a solution in HELP nor can I create one.

 

Would someone be kind enough to help me, please?

 

Many thanks ...

2 Replies

@tomc72 

You can simply call the macro associated with the button from the macro associated with the drop-down list by inserting its name:

' Macro for the command button:
Sub ButtonMacro()
    Range("D2:D50").ClearContents
End Sub

' Macro for drop-down list:
Sub DropdownlistMacro()
    ' Do some stuff
    ...
    ' Call the other macro
    ButtonMacro
End Sub
best response confirmed by tomc72 (Brass Contributor)
Solution
Just like that!
Thank you Hans, so much!
:thumbs_up::thumbs_up::thumbs_up::thumbs_up:
1 best response

Accepted Solutions
best response confirmed by tomc72 (Brass Contributor)
Solution
Just like that!
Thank you Hans, so much!
:thumbs_up::thumbs_up::thumbs_up::thumbs_up:

View solution in original post