[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Disable a Command Button

Posted on 2014-03-10
2
Medium Priority
?
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Michael Fowler earned 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

Dependencies in Software Design In software development, the idea of dependencies (http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29) is an issue of some importance. This article seeks to explain what dependencies are and where they …
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

650 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