![]() |
Hide & Unhide with a Checkbox
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
Hide & Unhide with a Checkbox
Hi Jonathan,
Try something like: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Me.CheckBox1.Value End Sub --- Regards, Norman "Jonathan" wrote in message ... I want to be able to hide and unhide rows depending if the value of a checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
Hide & Unhide with a Checkbox
Thnx Norman I'll givie it whirl
"Norman Jones" wrote: Hi Jonathan, Try something like: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Me.CheckBox1.Value End Sub --- Regards, Norman "Jonathan" wrote in message ... I want to be able to hide and unhide rows depending if the value of a checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
Hide & Unhide with a Checkbox
Thanks Norman,
What I mean (have tested and it's fab) but the rows will start hidden on the sheet - when the user check's the box and creates the Value "True" I want the rows to be visible when the box is unchecked and the value "False" I want the rows to be hidden. Can you help? "Norman Jones" wrote: Hi Jonathan, Try something like: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Me.CheckBox1.Value End Sub --- Regards, Norman "Jonathan" wrote in message ... I want to be able to hide and unhide rows depending if the value of a checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
Hide & Unhide with a Checkbox
Hi Jonathan,
What I mean (have tested and it's fab) but the rows will start hidden on the sheet - when the user check's the box and creates the Value "True" I want the rows to be visible when the box is unchecked and the value "False" I want the rows to be hidden. Try: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Not (Me.CheckBox1.Value) End Sub --- Regards, Norman "Jonathan" wrote in message ... Thanks Norman, What I mean (have tested and it's fab) but the rows will start hidden on the sheet - when the user check's the box and creates the Value "True" I want the rows to be visible when the box is unchecked and the value "False" I want the rows to be hidden. Can you help? "Norman Jones" wrote: Hi Jonathan, Try something like: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Me.CheckBox1.Value End Sub --- Regards, Norman "Jonathan" wrote in message ... I want to be able to hide and unhide rows depending if the value of a checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
Hide & Unhide with a Checkbox
Thanks Norman your a star!
"Norman Jones" wrote: Hi Jonathan, What I mean (have tested and it's fab) but the rows will start hidden on the sheet - when the user check's the box and creates the Value "True" I want the rows to be visible when the box is unchecked and the value "False" I want the rows to be hidden. Try: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Not (Me.CheckBox1.Value) End Sub --- Regards, Norman "Jonathan" wrote in message ... Thanks Norman, What I mean (have tested and it's fab) but the rows will start hidden on the sheet - when the user check's the box and creates the Value "True" I want the rows to be visible when the box is unchecked and the value "False" I want the rows to be hidden. Can you help? "Norman Jones" wrote: Hi Jonathan, Try something like: Private Sub CheckBox1_Click() Rows("10:20").Hidden = Me.CheckBox1.Value End Sub --- Regards, Norman "Jonathan" wrote in message ... I want to be able to hide and unhide rows depending if the value of a checkbox is tru or false but I am getting no results. Can anyone point me in the wright direction for the code? I am using the VBA checkbox not the Forms checkbox. Tia |
All times are GMT +1. The time now is 05:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com