Coupled controls?

  • Thread starter Thread starter Ruatha
  • Start date Start date
R

Ruatha

Hi, I have a button assciated with a macro, but I want to make sure tha
the button isn't pressed by mistake.
So I was thinking of having a checkbox, that when checked enables th
command button, and when unchecked the button is disabled.
How do I do that
 
I think I'd just add a bit to the macro that is associated with the button.

Option explicit
sub yoursubhere()

dim resp as long

resp = msgbox(Prompt:="Are you sure you want to do all this stuff", _
buttons:=vbyesno)

if resp = vbno then
exit sub
end if

'rest of your code here
 
Back
Top