Sub RunEmAll()
Macro1
Macro2
Macro3
Macro4
End Sub
thanks for reply but i want a macro to run all these forms not hide them.Hi !You could first hide all button except the #1.When its procedure is launched, you could hide the first button and unhide the second one …Or better just use a single button and at each step you just have to change the text of the buttonand control in the procedure when it starts the stuff to achieve according to the text button.
Hai,Presumably those buttons each have a macro assigned to them.
Let's say that the first button calls Macro1, the 2nd button calls Macro2, the 3rd button calls Macro3 and the 4th button calls Macro4.
Write a new Macro thus:
Now with the Excel GUI active (not the VBA editor), press Alt+F8 and highlight the RunEmAll macro, then click Options…, choose your shortcut, click OK, click Cancel.Code:Sub RunEmAll() Macro1 Macro2 Macro3 Macro4 End Sub
Sub runEmAll()
Sheet1.CommandButton1_Click
Sheet1.CommandButton2_Click
Sheet1.CommandButton3_Click
Sheet1.CommandButton4_Click
End Sub