Consulting

Results 1 to 4 of 4

Thread: Macro Toolbar, disable buttons

  1. #1
    VBAX Contributor
    Joined
    Mar 2009
    Location
    Porto, Portugal
    Posts
    180
    Location

    Macro Toolbar, disable buttons

    Hi
    I created a toolbar that calls all the macros in a workbook. This toolbar appears in all activesheets because all sheets in this workbook have macros to run.

    My question is:

    Is there a way to disable (or hide) macro buttons of the toolbar if their macros dont belong to the activesheet (this to prevent execute macros from another sheets)?

    I would aprecciate some help

    Thank you very much

  2. #2
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Greetings ioncila,

    I believe that should be fairly easy to accomplish, either thru the sheet(s)' activate/deactivate events, or the workbook's sheet activate/deactivate events.

    I would suggest attaching an example workbook (stripped of any private/sensitive info) as this would make it easier for anyone to answer, rather than having to guess and create an example.

    Mark

  3. #3

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    ioncila, Please read this before you post here again on why it is important to provide a link when you post in several forums with the same question:

    http://www.excelguru.ca/node/7
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

Posting Permissions

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