Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I tried VBA code that was posted earlier...
the code is: Private Sub CheckBox1_Click() Dim myRng as Range Set myRng = Me.Range("A20:A29").EntireRow (obviously suited to my range) myRng.Hidden = Me.CheckBox1.Value End Sub What this does is make it so that the rows are showing when the checkbox is NOT checked and once the checkbox IS checked, the rows are HIDDEN. How do I make it the other way around? I want to Check the box and have what was hidden now be visible. Obviously I'm new at the codes, etc. thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
maybe
myRng.Hidden = not Me.CheckBox1.Value Mon wrote: I tried VBA code that was posted earlier... the code is: Private Sub CheckBox1_Click() Dim myRng as Range Set myRng = Me.Range("A20:A29").EntireRow (obviously suited to my range) myRng.Hidden = Me.CheckBox1.Value End Sub What this does is make it so that the rows are showing when the checkbox is NOT checked and once the checkbox IS checked, the rows are HIDDEN. How do I make it the other way around? I want to Check the box and have what was hidden now be visible. Obviously I'm new at the codes, etc. thanks! -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
GREAT - it worked! Thank you!!
Now, is it possible to change the font size or make the Title to the Check Box Bold?? I need to show that it's a pretty big or important option in the form... thanks! "Dave Peterson" wrote: maybe myRng.Hidden = not Me.CheckBox1.Value Mon wrote: I tried VBA code that was posted earlier... the code is: Private Sub CheckBox1_Click() Dim myRng as Range Set myRng = Me.Range("A20:A29").EntireRow (obviously suited to my range) myRng.Hidden = Me.CheckBox1.Value End Sub What this does is make it so that the rows are showing when the checkbox is NOT checked and once the checkbox IS checked, the rows are HIDDEN. How do I make it the other way around? I want to Check the box and have what was hidden now be visible. Obviously I'm new at the codes, etc. thanks! -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe...
Option Explicit Private Sub CheckBox1_Click() Dim myRng As Range Set myRng = Me.Range("A20:A29").EntireRow myRng.Hidden = Not Me.CheckBox1.Value Me.CheckBox1.Font.Bold = Me.CheckBox1.Value End Sub Add the "NOT" if you want--not sure when it should be bold. If you always want it bold, then show its properties and doubleclick on Font. You can change the font and boldness there. Mon wrote: GREAT - it worked! Thank you!! Now, is it possible to change the font size or make the Title to the Check Box Bold?? I need to show that it's a pretty big or important option in the form... thanks! "Dave Peterson" wrote: maybe myRng.Hidden = not Me.CheckBox1.Value Mon wrote: I tried VBA code that was posted earlier... the code is: Private Sub CheckBox1_Click() Dim myRng as Range Set myRng = Me.Range("A20:A29").EntireRow (obviously suited to my range) myRng.Hidden = Me.CheckBox1.Value End Sub What this does is make it so that the rows are showing when the checkbox is NOT checked and once the checkbox IS checked, the rows are HIDDEN. How do I make it the other way around? I want to Check the box and have what was hidden now be visible. Obviously I'm new at the codes, etc. thanks! -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I get Excel to display a range of cells with a check box? | Excel Discussion (Misc queries) | |||
Display only certain cells | Excel Worksheet Functions | |||
Cells formated as text do not always display properly | Excel Discussion (Misc queries) | |||
Display empty cells | Excel Discussion (Misc queries) | |||
Display empty cells | Excel Discussion (Misc queries) |