+ Reply to Thread
Results 1 to 2 of 2

How to dissable active X command button on sheet

  1. #1
    Registered User
    Join Date
    08-31-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    38

    How to dissable active X command button on sheet

    Have a cmd button on a sheet that transfers data elsewhere. The way all my code is written if the button is clicked again a second lot of data will be added.
    I just know that someone is going to click this button more than once and cause a stuff up.

    How can I disable the button so that once it has been clicked it will not be active again until the workbook is reopened. (Yes I will have to add a msgbox that lets whoever uses this know what is happening otherwise they will be clicking the button to infinity and wondering why things are not updating, even though they have done it once and probably didn't notice).

    Any elegant solutions?

    Thanks

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: How to dissable active X command button on sheet

    Most elegant solution is to just check if the update happened before running the code
    so basically build into the code :

    - start of sub
    - check pointer to see if update has run before, if so - exit sub, if not - continue

    alternatively, just put
    Please Login or Register  to view this content.
    in your workbook_open
    and put
    Please Login or Register  to view this content.
    at the end of your commandbutton code.
    Please click the * below if this helps

+ 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. [SOLVED] Active Command Button Properties
    By Usethaschwarz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-15-2012, 08:47 AM
  2. Tab sequence from cell to active x button and then to a command button
    By 2funny4words in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2009, 02:27 PM
  3. Command button - to copy active sheet and not save current workbook
    By vjboaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2008, 05:23 PM
  4. Dissable Close button on Userform or Assign Code
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-19-2007, 10:07 AM
  5. Printing Active Sheet with command button
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2007, 03:53 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