Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Start a Macro within another Macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott Wagner - 28 Feb 2006 12:49 GMT
This is a really easy one...

How do I start another macro from within another Macro?

Is this the best method?

Application.Run "testing.xls!DeleteBoldOtto"
Chip Pearson - 28 Feb 2006 12:53 GMT
> Is this the best method?
>
> Application.Run "testing.xls!DeleteBoldOtto"

No, that is the worst method. It is very slow because VBA must
find, at run time, the specified procedure. To call one macro
from another, just type the macro name.

Sub AAA()
   TheMacro
End Sub

You can also use the Call statement:

Sub AAA()
   Call TheMacro
End Sub

but the Call is strictly optional.

Signature

Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

> This is a really easy one...
>
[quoted text clipped - 3 lines]
>
> Application.Run "testing.xls!DeleteBoldOtto"
Bob Phillips - 28 Feb 2006 12:56 GMT
If the macro is in the same workbook, just call it

   DeleteBoldOtto

Signature

HTH

Bob Phillips

(remove nothere from email address if mailing direct)

> This is a really easy one...
>
[quoted text clipped - 3 lines]
>
> Application.Run "testing.xls!DeleteBoldOtto"
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.