LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Check Box Help

I'm a rookie at this Visual Basic stuff and am trying to create a simple
macro that when checking/unchecking a check box, it unhides/hides a range of
rows.

If I record the macro the easy way, then assign it to a checkbox, unchecking
will hide the rows as expected. But when I go into VB to give have it unhide
the rows when checking the box, I have problems. Here is the code I'm trying
to use:

Sub Macro1()
'
' Macro1 Macro
'

'

Rows("10:32").Select
If CheckBox1.Checked = False Then
Selection.EntireRow.Hidden = True
Else
Selection.EntireRow.Hidden = False
End If

End Sub


The error I get in the debugger is "Object Required" and the "If
CheckBox1.Checked = False Then" is highlited.

From what I understand, when I go to Properties in the developer tab, I
should get a Properties box. But I only get a Format Control box.

Also, I'm told that when I insert a check box, I should get an option for
that check box in the dropdown in VB... I only get (General) or Worksheet.

Thanks for your help.
 
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
Copy and move check box (check boxes) with new cell link? Marty Excel Worksheet Functions 1 January 20th 10 07:43 PM
Loop through column(s) to check values, perform action based on check ward376 Excel Programming 4 November 6th 07 03:21 PM
Increase size of a Forms Check Box (click on to enter check mark) 718Satoshi Excel Discussion (Misc queries) 0 August 17th 07 01:52 AM
Check if Conditional Format is True or False / Check cell Color Kevin McCartney Excel Worksheet Functions 5 June 29th 07 11:12 AM
Enable check box in protected sheet + group check boxes Dexxterr Excel Discussion (Misc queries) 4 August 2nd 06 12:00 PM


All times are GMT +1. The time now is 09:13 AM.

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"