Consulting

Results 1 to 6 of 6

Thread: Deactivate button after it has been run once

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Contributor
    Joined
    Mar 2007
    Posts
    140
    Location

    Deactivate button after it has been run once

    Hello All,

    I have created my first ribbon which for me works well and is a considerable improvement over adding my old Word 2003 macro menus to the Quick Access Toolbar.

    I have attached a very cut down version of the ribbon and associated macros that I use to create a report.

    If a user clicks on the ‘Page Setup’ button it runs a macro that changes the page margins and also calls other macros.
    The problem is that if a user clicks on the button again it runs the other macros again which then causes problems.
    What I would like to do is add some extra code that ensures the ‘Page Setup’ button and its associated macros can only be run once.

    I do not want the picture to be changed and all I would like is a message box or similar pop up that tells the users that the ‘Page Setup’ button has already been clicked and the associated macros have run; i.e. the button is deactivated after being run once.

    Any help to achieve this would be appreciated.

    Regards,
    Dave T
    Attached Files Attached Files

Posting Permissions

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