Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default run 5 macros with 1 button

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default run 5 macros with 1 button

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

"ceige7979" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default run 5 macros with 1 button

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

sub1()
....
end sub
etc.

"ceige7979" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macros button Norm Excel Discussion (Misc queries) 3 May 1st 10 09:11 PM
Macros to Button Premal Excel Discussion (Misc queries) 2 April 15th 10 12:45 PM
Run Two Macros from Same Button Exceller Excel Programming 6 February 23rd 07 08:27 PM
1 button for 2 macros lunker55 Excel Discussion (Misc queries) 5 June 20th 05 06:25 PM
passing value with button to macros pabs[_13_] Excel Programming 3 January 6th 04 05:10 PM


All times are GMT +1. The time now is 02:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"