ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disable All Cmd Buttons Except Those Meeting Criteria (https://www.excelbanter.com/excel-programming/330229-disable-all-cmd-buttons-except-those-meeting-criteria.html)

Emm100

Disable All Cmd Buttons Except Those Meeting Criteria
 

Sure this may be an easy one and i'm overthinking it.........

I have approx 10 worksheets in my bookbook, each as a 1 command button
per month (therefore 12 buttons per sheet) The user selects which month
they will be updating from a combobox when the workbook starts, all
month-buttons except those for the month the user has selected are then
disabled. E.g. if you pick January then you can only click the January
update button and every other month button is disabled in ALL the
sheets.

Obviously i don't want to set up a Workbooks.Worksheets.button.Enabled
= False line for hundreds of combinations in my SELECT CASE
function.........so is there a way i can disable all command buttons
EXCEPT those who meet the CASE criteria in the select case function?

Thanks

Emm100


--
Emm100


------------------------------------------------------------------------
Emm100's Profile: http://www.excelforum.com/member.php...o&userid=23236
View this thread: http://www.excelforum.com/showthread...hreadid=374114


Leith Ross[_18_]

Disable All Cmd Buttons Except Those Meeting Criteria
 

Hello Emm100,

Why not start will ALL the command buttons Disabled and then onl
Enable the current month selected ? Check the value of ComboBox, lik
you said with a Select Case statement, and Enable the proper comman
button. From your post, I feel you can work the rest of the code out
but if you need help coding this, you can email me .

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=37411


Emm100[_2_]

Disable All Cmd Buttons Except Those Meeting Criteria
 

How did i know it would be amazingly simple!

Lol have to love it when you rack your brains to think of something as
easy as that!

Thanks Leith


--
Emm100


------------------------------------------------------------------------
Emm100's Profile: http://www.excelforum.com/member.php...o&userid=23236
View this thread: http://www.excelforum.com/showthread...hreadid=374114



All times are GMT +1. The time now is 12:30 AM.

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