ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Enable or Disable Forms Button on a worksheet from code (https://www.excelbanter.com/excel-programming/400553-enable-disable-forms-button-worksheet-code.html)

Corey

Enable or Disable Forms Button on a worksheet from code
 
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....



Barb Reinhardt

Enable or Disable Forms Button on a worksheet from code
 
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.
--
HTH,
Barb Reinhardt



"Corey" wrote:

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....





All times are GMT +1. The time now is 10:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com