vendredi 7 juillet 2023

How can I hide different sets of ActiveX checkboxes in Excel based on two variables?

I'm really new at VBA, so I apologize. Hopefully I can describe well enough. I recently changed a section of my spreadsheet from an area I can completely white out with conditional formatting to an area that is text (which I can white out), but also a row of 13 Active X checkboxes. This pick shows a setup where box 13 should not be shown. example

Bear with my sudden thought change. This was what I originally wanted: When I white out now, obviously the checkboxes will not do the same. The main problem lies in that I need certain checkboxes shown based on the value in cell K12 and the value in Z77. If Z77="N", then all the boxes need to be hidden, no matter what K12 is. If Z77="Y" and K12="B", then checkboxes 5-13 need to hide. If Z77="Y" and K12="D", then only box 13 needs to hide. If Z77="Y" and K12="P", then checkboxes 8-12 need to hide.

But now I'm thinking more towards the end user that my selection boxes might be easier if I changed Z77 from a Y/N option to a checkbox. I would have to change K12 to three checkboxes to select from. How much more complicated would that make my life? So fun to have a sudden mindshift when almost complete with a project... can you help?

And as long as I have you, what would recommend as the best way to learn VBA to be?

I couldn't find anything that suited my needs.




Aucun commentaire:

Enregistrer un commentaire