lock button after click
Use the Enabled property...as below after the macro is called
Private Sub CommandButton1_Click()
Run "Macro"
CommandButton1.Enabled = False
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Carl" wrote:
Hi Guys Dolls
I have a worksheet which is used for master data input - there is a Button
which when clicked generates a "Form" number via a Macro assigned to the
button. After generating the number I want to lock the button. I cannot use
Sheet Protect as I use it at the end of the worksheet when the last user
completes their input the Sheet protection is called via a Macro assigned to
a different button. the button is in Cell I5.
please could you assit with VBA code which would lock the Button after
number generation but leave the rest of the sheet unprotected for data entry.
Many thanks
Carl
|