ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Make tools button grey (https://www.excelbanter.com/excel-programming/275294-re-make-tools-button-grey.html)

kiat

Make tools button grey
 
I can vaguely remember using personal workbook when coding for Mac but that
was long time ago and I only use Windows now. Try if this works:

if workbooks.count = 0 then
'i'm not sure what buttons, so...
end if


"Huyeote" wrote in message
...
Thanks for the reply. But my subs called from those buttons are in

Personal
workbook. How can I make a sub in Personal workbook and count number of
workbooks open. If count is zero, set Enabled proper to false.

Regards,

Huyeote

"kiat" wrote in message
...
Set its Enabled property to False: yourbutton.enabled = false

"Huyeote" wrote in message
...
Hi, all, I notice that colour of Excel's button in Excel's tools bar

will
go
grey when there is no workbook open. Can anybody tell me how to make

my
own
DIY macro button's colour go grey (invalide) just as those Excel's

build-in
buttons do. Thanks.

Huyeote












All times are GMT +1. The time now is 12:23 PM.

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