+ Reply to Thread
Results 1 to 3 of 3

Running a Macro from within another macro

  1. #1
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Running a Macro from within another macro

    Is there a way of calling a macro from within another macro?

    Example

    Sub Button1_Click()
    For a = 1 To 10000
    Range("A1") . Value = a
    Next a
    ' Would now like to run the macro which is behind Sub Button2_Click()
    End Sub

  2. #2
    Peo Sjoblom
    Guest

    Re: Running a Macro from within another macro

    Yes,

    put the name of the macro within your macro

    Sub MyMacro1()
    MyMacro2
    End Sub

    Regards,

    Peo Sjoblom

    "grahammal" <[email protected]> wrote
    in message news:[email protected]...
    >
    > Is there a way of calling a macro from within another macro?
    >
    > Example
    >
    > Sub Button1_Click()
    > For a = 1 To 10000
    > Range("A1") . Value = a
    > Next a
    > ' Would now like to run the macro which is behind Sub
    > Button2_Click()
    > End Sub
    >
    >
    > --
    > grahammal
    > ------------------------------------------------------------------------
    > grahammal's Profile:

    http://www.excelforum.com/member.php...o&userid=20336
    > View this thread: http://www.excelforum.com/showthread...hreadid=478781
    >




  3. #3
    Forum Contributor
    Join Date
    02-24-2005
    Posts
    154

    Macro within Macro

    Works perfectly.
    Thanks a million.

+ 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