Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Marc
 
Posts: n/a
Default I need help with macros and check boxes.

I can record a macro to hide or unhide columns or cells but I need to
reverse the process when the button toggles to the other position. I need
the cells to be hidden until the box is "checked" but hide if it gets
unchecked.

Marc


  #2   Report Post  
Posted to microsoft.public.excel.newusers
Mel Arquiza
 
Posts: n/a
Default I need help with macros and check boxes.

Hi Marc,

Try this:

Placed a check box on excel and paste this code below:

Private Sub CheckBox1_Click()
Range("A1").Select 'Active Cell Select
If CheckBox1.Value = True Then
Selection.EntireRow.Hidden = True
Else: CheckBox1.Value = False
Selection.EntireRow.Hidden = False
End If
End Sub

Hope this helps.

"Marc" wrote:

I can record a macro to hide or unhide columns or cells but I need to
reverse the process when the button toggles to the other position. I need
the cells to be hidden until the box is "checked" but hide if it gets
unchecked.

Marc



  #3   Report Post  
Posted to microsoft.public.excel.newusers
Marc
 
Posts: n/a
Default I need help with macros and check boxes.

Mel thanks! It dawned on me after I sent the post if I used the check boxes
from the "Forms" not the "Control Toolbox" I could get a true false and use
that to make the changes but yours is more elegant.

Marc

"Mel Arquiza" wrote in message
...
Hi Marc,

Try this:

Placed a check box on excel and paste this code below:

Private Sub CheckBox1_Click()
Range("A1").Select 'Active Cell Select
If CheckBox1.Value = True Then
Selection.EntireRow.Hidden = True
Else: CheckBox1.Value = False
Selection.EntireRow.Hidden = False
End If
End Sub

Hope this helps.

"Marc" wrote:

I can record a macro to hide or unhide columns or cells but I need to
reverse the process when the button toggles to the other position. I

need
the cells to be hidden until the box is "checked" but hide if it gets
unchecked.

Marc





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
Macros and Toolbars Bec Excel Discussion (Misc queries) 7 January 23rd 06 02:54 PM
Check Boxes Adam Kroger Excel Discussion (Misc queries) 11 December 18th 05 05:37 PM
Check Box Printing Frank Rudd via OfficeKB.com Excel Discussion (Misc queries) 0 June 30th 05 08:05 PM
Macros to delete check boxes GWB Direct Excel Discussion (Misc queries) 23 June 3rd 05 09:56 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


All times are GMT +1. The time now is 10:33 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"