+ Reply to Thread
Results 1 to 6 of 6

Click button in one worksheet to activate Macro in another

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Click button in one worksheet to activate Macro in another

    Im having trouble connecting the button in one worksheet (which I have aptly named home page) to a macro in the next sheet. Im using excel 2003 can anyone help?

  2. #2
    Forum Contributor
    Join Date
    08-09-2012
    Location
    Anch, Alaska
    MS-Off Ver
    2003, 2010, 2013
    Posts
    131

    Re: Click button in one worksheet to activate Macro in another

    You can do 1 of 2 things.

    If you macro your trying to call is Labeled with "Private" use = Book1!Sheet2.MyMacro , without the = sign
    • Book1 is the Name of your Wookbook
    • Sheet2 is the Worksheet name. See "Project Explorer" for sheet number i.e. Sheet2(Home Page)
    • MyMacro is the name of your macro you are trying to call.


    Or you can simply remove the Private from the sub then assign it to your button.
    Last edited by BuckoAk; 09-01-2012 at 06:55 PM. Reason: updated line with additional comment

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Click button in one worksheet to activate Macro in another

    Let me give it a go, sounds like it should work.

  4. #4
    Forum Contributor
    Join Date
    08-09-2012
    Location
    Anch, Alaska
    MS-Off Ver
    2003, 2010, 2013
    Posts
    131

    Re: Click button in one worksheet to activate Macro in another

    If your happy with your answer, be sure to mark you post as [Solved].
    At the Top Right of your Post You can:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    You can also give credit by clicking on the Star at the bottom left of the supporting post.
    Give Credit When Credit Is Due - Click On the Star
    Be Sure To Mark Your Post [Solved] When You Get Your Answer

  5. #5
    Registered User
    Join Date
    08-21-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Click button in one worksheet to activate Macro in another

    Thanks for the help, only got to use it last night. Hopefully you will come to my rescue again in the not so distant future!

  6. #6
    Forum Contributor
    Join Date
    08-09-2012
    Location
    Anch, Alaska
    MS-Off Ver
    2003, 2010, 2013
    Posts
    131

    Re: Click button in one worksheet to activate Macro in another

    Quote Originally Posted by guvner5 View Post
    Thanks for the help, only got to use it last night. Hopefully you will come to my rescue again in the not so distant future!
    I'm glad it's working for you.
    I'll be here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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