ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Check box reversal (https://www.excelbanter.com/excel-discussion-misc-queries/132174-check-box-reversal.html)

TDC

Check box reversal
 
I want to use a check box to hide some cell and unhide the same. So, when
the check box is checked I am using a macro to hide the cells, but then how
do I get the cells unhided since a check box can only assign one macro.
Suggestions?

E.Q.

Check box reversal
 
I'm not sure what the nature of the cells you're hiding, but I played with a
column and set the hidden property to the linked cell value of a check box.
Say your check box is linked to a cell named "cbout". the following line of
code hid column f:
Column("f:f").hidden = range("cbout").value
I assigned that macro to the check box and was hiding and unhiding column F
to my hearts content.

I don't know if that will apply to your application, but I hope it helps.
E.Q.


TDC

Check box reversal
 
E.Q. - Thanks a lot. That works great and it is so simple. Sometimes one
can't see the forest because of the trees.

TDC

"E.Q." wrote:

I'm not sure what the nature of the cells you're hiding, but I played with a
column and set the hidden property to the linked cell value of a check box.
Say your check box is linked to a cell named "cbout". the following line of
code hid column f:
Column("f:f").hidden = range("cbout").value
I assigned that macro to the check box and was hiding and unhiding column F
to my hearts content.

I don't know if that will apply to your application, but I hope it helps.
E.Q.



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

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