ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Dim and Disable Buttons (https://www.excelbanter.com/excel-programming/428321-dim-disable-buttons.html)

jswalsh33

Dim and Disable Buttons
 
I have a worksheet with Buttons that are used to launch different macros. At
certain times I would like to make some buttons inactive.

I would like to be able to Dim and make thise buttons inactive.

I am running Windows XP and Excel OFFXL7.

Suggestions?

Jim Walsh



FSt1

Dim and Disable Buttons
 
hi
not hard really. in help look up the enabled property.
might work like this...
sheets("sheet1").commandbuttton1.endable = false ' to turn off
sheets("sheet1").commandbuttton1.endable = true ' to turn on

but....

At certain times I would like to make some buttons inactive.


this sounds like the real tricky part. due to lack of info, i don't think i
am able to help much further. sorry.

Regards
FSt1

"jswalsh33" wrote:

I have a worksheet with Buttons that are used to launch different macros. At
certain times I would like to make some buttons inactive.

I would like to be able to Dim and make thise buttons inactive.

I am running Windows XP and Excel OFFXL7.

Suggestions?

Jim Walsh



FSt1

Dim and Disable Buttons
 
sorry. i misspelled enabled on the example i gave. should be..
sheets("sheet1").commandbuttton1.enabled= false ' to turn off
sheets("sheet1").commandbuttton1.enabled = true ' to turn on


accursed fat fingers!!

regards
FSt1


"FSt1" wrote:

hi
not hard really. in help look up the enabled property.
might work like this...
sheets("sheet1").commandbuttton1.endable = false ' to turn off
sheets("sheet1").commandbuttton1.endable = true ' to turn on

but....

At certain times I would like to make some buttons inactive.


this sounds like the real tricky part. due to lack of info, i don't think i
am able to help much further. sorry.

Regards
FSt1

"jswalsh33" wrote:

I have a worksheet with Buttons that are used to launch different macros. At
certain times I would like to make some buttons inactive.

I would like to be able to Dim and make thise buttons inactive.

I am running Windows XP and Excel OFFXL7.

Suggestions?

Jim Walsh



jswalsh33

Dim and Disable Buttons
 


"FSt1" wrote:

sorry. i misspelled enabled on the example i gave. should be..
sheets("sheet1").commandbuttton1.enabled= false ' to turn off
sheets("sheet1").commandbuttton1.enabled = true ' to turn on


accursed fat fingers!!


I tried the suggested code and got runtime error "Object doesn't support
this property or method"

I also do not know what my Button numbers are. Is there a way to tell?

Any additional help would be greatly appreciated.

Jim Walsh

regards
FSt1


"FSt1" wrote:

hi
not hard really. in help look up the enabled property.
might work like this...
sheets("sheet1").commandbuttton1.endable = false ' to turn off
sheets("sheet1").commandbuttton1.endable = true ' to turn on

but....

At certain times I would like to make some buttons inactive.


this sounds like the real tricky part. due to lack of info, i don't think i
am able to help much further. sorry.

Regards
FSt1

"jswalsh33" wrote:

I have a worksheet with Buttons that are used to launch different macros. At
certain times I would like to make some buttons inactive.

I would like to be able to Dim and make thise buttons inactive.

I am running Windows XP and Excel OFFXL7.

Suggestions?

Jim Walsh




All times are GMT +1. The time now is 02:34 PM.

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