Enable or Disable Forms Button on a worksheet from code

  • Thread starter Thread starter Corey
  • Start date Start date
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....
 
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.
 
Back
Top