Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Using one macro to run another

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    Alberta, Canada
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I know this has been mentioned other times, but I can't find it by searching. What VB code do I put in to run one macro with another macro?

  2. #2
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    One of three ways:

    To run myMcr

    put one of the following lines of code in your macro

    myMcr

    call myMcr

    application.run("myMcr")


    Hope this helps.

    _________________
    Cheers, NateO
    "Me no are no nice guy."

    [ This Message was edited by: NateO on 2002-04-25 12:39 ]

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    Alberta, Canada
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I am trying to run a macro in a module from a form macro, but the form macro says it can't find the module macro. any reason why? Do I have to put all my macros into the form?

  4. #4
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You should be able to run it with:

    Code:
    Application.Run ("myMcr")
    Double check the spelling [of your macro] perhaps. If not respond accordingly we can add the module name, etc...

    _________________
    Cheers, NateO

    [ This Message was edited by: NateO on 2002-04-25 16:25 ]

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    Alberta, Canada
    Posts
    50
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Application.Run ("Cancel_Click")
    -the macro associated with this item says it can't find the macro Cancel_Click (runt time error 1004)


    Private Sub Cancel_Click()
    End
    End Sub
    -here is the macro cancel click

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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