run 5 macros with 1 button

  • Thread starter Thread starter ceige7979
  • Start date Start date
C

ceige7979

I have 5 seperate macros in one workbook. I want to build one button that
will run them all. I can not use Access I have to use Excel
 
To the button assign the sub MainOne and click the button. Put your five
codes where the Msgbox code is.

Sub MainOne()
TheNext1
End Sub

Sub TheNext1()
MsgBox "Next1"
TheNext2
End Sub

Sub TheNext2()
MsgBox "Next2"
TheNext3
End Sub

Sub TheNext3()
MsgBox "Next3"
TheNext4
End Sub

Sub TheNext4()
MsgBox "Next4"
TheNext5
End Sub

Sub TheNext5()
MsgBox "That all five folks"
End Sub

HTH
Regards,
Howard
 
Hi ceige7979
As L.Howard Kittle says or more simply:
sub Commandbutton_click()
sub1
sub2
sub3
sub4
sub5
end sub

sub1()
....
end sub
etc.
 
Back
Top