Solved

Disable a Command Button

Posted on 2014-03-10
2
282 Views
Last Modified: 2014-03-10
I have a command button called StartCommandButton.  When it is clicked it runs the following procedure.  I want the button disabled when it completes the click event procedure.    Users may only click it one time.

Private Sub StartCommandButton_Click()
    ActiveCell.Offset(0, 3).Range("A1").Activate
    ActiveCell.Formula = Time
End Sub
0
Comment
Question by:cowboywm
2 Comments
 
LVL 23

Accepted Solution

by:
Michael74 earned 500 total points
ID: 39919427
Just set the enable property to false eg

Private Sub StartCommandButton_Click()
    ActiveCell.Offset(0, 3).Range("A1").Activate
    ActiveCell.Formula = Time
    StartCommandButton.Enabled = False
End Sub 

Open in new window


Michael
0
 

Author Closing Comment

by:cowboywm
ID: 39919744
This did exactly what I wanted it to do.  Thanks, Michael.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The CRUD Functions CRUD, meaning "Create, Read, Update, Delete (http://en.wikipedia.org/wiki/Create,_read,_update_and_delete)" is a common term to data base developers.  It describes the essential functions of data base table maintenance.  This art…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question