Disable All Cmd Buttons Except Those Meeting Criteria

  • Thread starter Thread starter Emm100
  • Start date Start date
E

Emm100

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
 
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 (e-mail address removed).

Sincerely,
Leith Ros
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top