+ Reply to Thread
Results 1 to 3 of 3

Insert Command Button that will Activate Command Button on a Different Sheet

  1. #1
    Registered User
    Join Date
    05-28-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2003
    Posts
    33

    Insert Command Button that will Activate Command Button on a Different Sheet

    Hello everyone,

    I have a command button on sheet 5 that I would like to be able to activate from sheet 2. I have tried to just run the same Macro on sheet 2, but when I try to make the Macro reference sheet 5 I am getting errors. Can some either help me with the code, or explain how I could have the button on sheet 2 activate the button on sheet 5.

    Original Macro on Sheet 5

    Please Login or Register  to view this content.


    Attempt at Macro on Sheet 2

    Please Login or Register  to view this content.

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Insert Command Button that will Activate Command Button on a Different Sheet

    It should work if you have sub-routine for Sheet2 with a different name.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Insert Command Button that will Activate Command Button on a Different Sheet

    Hi realvirtuality1,

    It is not clear what you want since you did not provide a sample workbook.

    My understanding is that you want "Sheet5" cells W14 and J36 all the time, no matter what sheet your are on. If this is the case:
    a. Create a macro that works in an ordinary code module such as Module1:
    Please Login or Register  to view this content.
    b. Create a Shape or Forms CommandButton on 'Sheet5' that is assigned to Macro solver11().
    c. Copy the Shape or Forms CommandButton to the other sheets as required.

    See the attached sample file.

    Lewis
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code to create command button. Print all sheets then delete command button.
    By Declamatory in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2015, 05:18 PM
  2. Command button do not activate until changing cell.
    By Hybris6 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-23-2013, 09:04 AM
  3. Activate 2 dropdowns with one command button
    By smoot123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 10:10 PM
  4. Using a Active X command button to activate a hyperlink
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-27-2009, 12:18 PM
  5. Use a command button to activate a hyperlink
    By penfold in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-27-2008, 09:33 AM
  6. Replies: 1
    Last Post: 09-17-2007, 09:57 PM
  7. Replies: 0
    Last Post: 11-03-2005, 11:00 AM

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