Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disable command buttons after macro runs

Status
Not open for further replies.

kenadys

Technical User
Aug 14, 2002
13
0
0
US
I have a form with five command buttons. Each command button is linked to a macro. Is there a way to disable the button after the macro runs? So, the user cannot run the procedure more than once during the process.
 
The easiest thing to do is to set the visible property of the command button to false On it's click event. You can even run a macro or do equivalent things in VBA.

If you need help doing this, please post the name of the macro and the name of the control.
 
Instead of setting the visible property to false, set the enabled property to false. This will maintian the form on your screen, but in a 'dim' format so that it can be seen but not clicked. You could even set the mnouse over event to pop up a "Buttton disabled" message.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top