+ Reply to Thread
Results 1 to 4 of 4

Invoking a macro from within another

  1. #1
    jnsaunders
    Guest

    Invoking a macro from within another

    Can't figure this out.

    I want a macro to run another macro or several other macros. How do you do
    it?

    Thanks...I know this should be simple, but I can't find the solution
    anywhere.



  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264
    Hi

    It is literally as simple as:

    Sub MyMacro()
    MyOtherMacro
    End Sub

    Sub MyOtherMacro()
    Msgbox "Hello, World!"
    End Sub

    You don't need to use the Call statement.

    Hope this helps!

    Richard

  3. #3

    Re: Invoking a macro from within another

    Sub RunMacro
    MyTest
    MyOutput
    end sub

    sub MyTest
    msgbox "this is my test"
    end sub

    sub MyOutput
    msgbox "this is my output"
    end sub


    in other words, just put the name of the sub and it will run.


  4. #4
    jnsaunders
    Guest

    Re: Invoking a macro from within another

    Thanks - that was easy.


    "jnsaunders" <[email protected]> wrote in message
    news:%230Eu2g%[email protected]...
    > Can't figure this out.
    >
    > I want a macro to run another macro or several other macros. How do you do
    > it?
    >
    > Thanks...I know this should be simple, but I can't find the solution
    > anywhere.
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1