Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Checkbox to Unhide Rows

Is it possible to use a check box to 'Unhide Rows'? What I would like to do
is have a client select a check box(es), then press a button I have inserted
into the spreadsheet to run a macros. This macros would Unhide rows
according to which boxes have been checked. Or is there a way to have rows
'reveal' or hide themselves as a check box is checked or unchecked, thus
avoiding the need for a macros? My macros skills are OK at best. Thank you
in advance for any and all help.

Dan
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Checkbox to Unhide Rows

Hi Dan

No extra buttons needed, we tie the macro up to the check box.

As this is an event code it shall be in the codesheet for the sheet where
the checkbox is.
With a Check box named CheckBox1 this macro will unhide rows 1:3 when the
check box is checked. When the check box is unchecked rows 1:3 will be
hidden.

Private Sub CheckBox1_Change()
If Me.CheckBox1.Value = True Then
Rows("1:3").Hidden = False
Else
Rows("1:3").Hidden = True
End If
End Sub

Regards,
Per
"WOLLAM" skrev i meddelelsen
...
Is it possible to use a check box to 'Unhide Rows'? What I would like to
do
is have a client select a check box(es), then press a button I have
inserted
into the spreadsheet to run a macros. This macros would Unhide rows
according to which boxes have been checked. Or is there a way to have
rows
'reveal' or hide themselves as a check box is checked or unchecked, thus
avoiding the need for a macros? My macros skills are OK at best. Thank
you
in advance for any and all help.

Dan


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Checkbox to Unhide Rows

Hi Per,

Thanks for the input. However, I don't really know what the codesheet is or
how to enter/add anything to it. Any tips?

Thanks,
Dan

"Per Jessen" wrote:

Hi Dan

No extra buttons needed, we tie the macro up to the check box.

As this is an event code it shall be in the codesheet for the sheet where
the checkbox is.
With a Check box named CheckBox1 this macro will unhide rows 1:3 when the
check box is checked. When the check box is unchecked rows 1:3 will be
hidden.

Private Sub CheckBox1_Change()
If Me.CheckBox1.Value = True Then
Rows("1:3").Hidden = False
Else
Rows("1:3").Hidden = True
End If
End Sub

Regards,
Per
"WOLLAM" skrev i meddelelsen
...
Is it possible to use a check box to 'Unhide Rows'? What I would like to
do
is have a client select a check box(es), then press a button I have
inserted
into the spreadsheet to run a macros. This macros would Unhide rows
according to which boxes have been checked. Or is there a way to have
rows
'reveal' or hide themselves as a check box is checked or unchecked, thus
avoiding the need for a macros? My macros skills are OK at best. Thank
you
in advance for any and all help.

Dan



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Checkbox to Unhide Rows

Show the control toolbox toolbar (via View|Toolbars in xl2003 menus)--not the
Forms toolbar!

Click on the design mode icon.
Add a checkbox to a nice location.
Double click on that checkbox and you'll be taken to the VBE--where that code is
going to go.

You see something like this on the righthand side:

Private Sub CheckBox1_Click()

End Sub

Delete that and replace it with Wollam's code:

Then back to excel.
Click the design mode icon again (to get back to normal)
and test it out.

I wouldn't put the checkbox in a row that's going to be hidden!

Ps. Make sure the Checkbox1 stuff matches the name of the checkbox you added.
It could be different if you've played around with it.

Then

WOLLAM wrote:

Hi Per,

Thanks for the input. However, I don't really know what the codesheet is or
how to enter/add anything to it. Any tips?

Thanks,
Dan

"Per Jessen" wrote:

Hi Dan

No extra buttons needed, we tie the macro up to the check box.

As this is an event code it shall be in the codesheet for the sheet where
the checkbox is.
With a Check box named CheckBox1 this macro will unhide rows 1:3 when the
check box is checked. When the check box is unchecked rows 1:3 will be
hidden.

Private Sub CheckBox1_Change()
If Me.CheckBox1.Value = True Then
Rows("1:3").Hidden = False
Else
Rows("1:3").Hidden = True
End If
End Sub

Regards,
Per
"WOLLAM" skrev i meddelelsen
...
Is it possible to use a check box to 'Unhide Rows'? What I would like to
do
is have a client select a check box(es), then press a button I have
inserted
into the spreadsheet to run a macros. This macros would Unhide rows
according to which boxes have been checked. Or is there a way to have
rows
'reveal' or hide themselves as a check box is checked or unchecked, thus
avoiding the need for a macros? My macros skills are OK at best. Thank
you
in advance for any and all help.

Dan




--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot unhide rows stevemalee[_2_] Excel Worksheet Functions 7 April 13th 08 05:58 PM
Unhide Rows Jordan Excel Discussion (Misc queries) 3 November 7th 07 04:34 PM
Can't unhide rows Rob Excel Discussion (Misc queries) 3 December 13th 05 11:46 PM
Unhide rows [email protected] Excel Discussion (Misc queries) 3 December 14th 04 05:28 PM
Checkbox to hide and unhide rows Please. Steved Excel Worksheet Functions 2 December 6th 04 11:30 PM


All times are GMT +1. The time now is 04:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"