Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default I am so confused! I need help with a check box and a macro.

I am trying to have a check box control whether certain columns, rows and
worksheets are hidden or unhidden. Over at the newusers forum someone gave
me a macro that I have tried to modify to make this happen.

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

The range should be the columns, rows and worksheets that are to be hidden
or unhidden?
The Select.Entire Row is what the macro acts on?
If I've renamed my check boxes than I should use that name in place on
CheckBox1?

Any help would be appreciate.

Marc


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default I am so confused! I need help with a check box and a macro.

hi
this will hide row 1

Private Sub CheckBox1_Click()
Columns("A:A").Select
Range("A1").Activate 'Active Cell Select
If CheckBox1.Value = True Then

Range("A1").EntireRow.Hidden = True
Else: CheckBox1.Value = False
Range("A1").EntireRow.Hidden = False
End If
End Sub



Regards Yngve

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
Confused Dale Excel Worksheet Functions 4 March 28th 07 02:52 AM
:S confused :S Laura \( '_' \) Charts and Charting in Excel 1 November 15th 05 01:44 PM
Sorry I am confused Desmond Excel Discussion (Misc queries) 7 April 24th 05 10:40 PM
check off, look up forms - VERY confused Abi Excel Discussion (Misc queries) 1 January 8th 05 01:47 AM


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