Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default execute a macro from another macro

hi,

how do i execute a macro fron another macro? They are in the same
workbook, but in different worksheets!

Thanks


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default execute a macro from another macro

Sub MyMacro()
Sheet1.OtherMacro
End Sub

--
Regards,

"joao" wrote in message
...
hi,

how do i execute a macro fron another macro? They are in the same
workbook, but in different worksheets!

Thanks


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default execute a macro from another macro

Macros on different modules of the same workbook are called exactly as if
they were in the same module - by their names:

In Module1:

Sub CallMod2Sub()
Mod2Sub
End Sub

In Module2:

Sub Mod2Sub()
MsgBox "Hello from Module2"
End Sub

--
Jim Rech
Excel MVP


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default execute a macro from another macro

Just put the name of the macro

Call macroname

regards
Km
-----Original Message-----
hi,

how do i execute a macro fron another macro? They are in

the same
workbook, but in different worksheets!

Thanks


---
Message posted from http://www.ExcelForum.com/

.

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
Auto Execute Macro dennis[_2_] Excel Discussion (Misc queries) 4 January 17th 09 04:47 PM
Auto Execute Macro dennis[_2_] Excel Worksheet Functions 4 January 17th 09 04:47 PM
Auto-execute macro.... Eric @ SEASH, Evansville Excel Discussion (Misc queries) 1 August 24th 05 09:32 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
Execute Macro Yves Excel Discussion (Misc queries) 3 April 23rd 05 04:26 PM


All times are GMT +1. The time now is 04:38 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"