Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Cam Cam is offline
external usenet poster
 
Posts: 165
Default VB code to run multiple macro

Hello,

I have several macro that need to be ran once a button is click.
What VB code I put to tell it to run several macro?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default VB code to run multiple macro

You run the first macro then call the second from that i.e.

Sub Sonic()
'do something
mynextmacro
end sub


Sub mynextmacro()
'do something else
mythirdmacro
end sub

sub mythirdmacro()
etc

Mike


"Cam" wrote:

Hello,

I have several macro that need to be ran once a button is click.
What VB code I put to tell it to run several macro?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default VB code to run multiple macro

To be more specific:

'Coce behind the command button

Private Sub CommandButton1_Click()
MainMacro
End Sub

'Code in standard code Module1

Sub MainMacro
Macro1name
Macro2name
Macro3name
...
Macronname
End Sub

"Cam" wrote:

Hello,

I have several macro that need to be ran once a button is click.
What VB code I put to tell it to run several macro?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default VB code to run multiple macro

Typo!
Shoud be Sub MainMacro()

"JLGWhiz" wrote:

To be more specific:

'Coce behind the command button

Private Sub CommandButton1_Click()
MainMacro
End Sub

'Code in standard code Module1

Sub MainMacro
Macro1name
Macro2name
Macro3name
...
Macronname
End Sub

"Cam" wrote:

Hello,

I have several macro that need to be ran once a button is click.
What VB code I put to tell it to run several macro?

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
A macro code to print multiple sheets in different w.books Gladiator Excel Discussion (Misc queries) 3 February 22nd 10 07:49 PM
Need help on code - Macro on multiple worksheets J@Y Excel Discussion (Misc queries) 2 February 2nd 07 08:05 PM
Modify macro code to export multiple cell contents to multiple Text Files [email protected] Excel Programming 3 October 14th 06 08:26 AM
macro or code to open multiple workbooks Duane Reynolds Excel Discussion (Misc queries) 1 March 14th 06 08:18 AM
Macro as multiple use code Bruce Neylon New Users to Excel 6 June 29th 05 06:11 PM


All times are GMT +1. The time now is 09:21 AM.

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

About Us

"It's about Microsoft Excel"