+ Reply to Thread
Results 1 to 4 of 4

Click on Wrong Button

  1. #1
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2013
    Posts
    137

    Click on Wrong Button

    Hi

    I have this workbook with 10 sheets. Each sheet has macros that are called from a floating toolbar.

    What I am trying to do:

    I want to create a msgbox that warns me when I click in a toolbar's button to call a macro that not runs in the activesheet.

    Something like: "This code (or macro) doesn't match (or run) with the active sheet. Do you want to go on?"

    That maybe is simple, but I'm facing some dificulties to do that, so a little help will be welcome.

    Thank you very much

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983

    Re: Click on Wrong Button

    you would need to add code at the start of each macro
    change sheet name to suit
    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Contributor
    Join Date
    03-24-2009
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2013
    Posts
    137

    Re: Click on Wrong Button

    That's it. Thank you very much.

    SOLVED

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Click on Wrong Button

    You might consider adding some code the the SheetChange event in the Thisworkbook object which would enable/disable the buttons on the toolbar depending on the sheet.
    Cheers
    Andy
    www.andypope.info

+ 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