Enable or Disable Forms Button on a worksheet from code

C

Corey

I am trying to enable or diable a forms button on a worksheet via code but have not been successful.

Is it possible ?

If so how ?

The button name is Button 6

Corey....
 
G

Guest

I think I'd do it something like this (untested)

Set as a public variable
Public DisableButton6 as Boolean

In code to enable/disable

If DisableButton6 then
DisableButton6 = FALSE
else
DisableButton6 = TRUE
end if

In the code for Button6, put this

If DisableButton6 then Exit sub

Or something to that effect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top