Solved

Disable a Command Button

Posted on 2014-03-10
2
279 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
Comment Utility
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
Comment Utility
This did exactly what I wanted it to do.  Thanks, Michael.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How do I customize my Standard Colors in PowerPoint 2010? 6 36
Event ID 10010 3 36
tenRun challenge 28 81
scores100 challenge 3 82
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
What is Waterfall Model? Waterfall model is the classic Software Development Life Cycle method practiced in software development process. As the name "waterfall" describes, this development is flowing downwards steadily like waterfall, i.e., procee…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

744 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now