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: 22
Default Macro to Hide Rows

I'm using the following macro to hide/show rows, but I get a "run-time error
'1004' Unable to set the Hidden property of the Range Class" if the row
contains a combo box. The combo boxes are inserting information into
adjoining cells on the same row. What could be causing the error?

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$2" Then
Range("2:" & Rows.Count).EntireRow.Hidden = False
Range(CStr(3 + 2 * Range("A2").Value) & ":" & _
Rows.Count).EntireRow.Hidden = True
End If
End Sub
 
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
Macro code to hide rows and not calculate hidden rows bradmcq Excel Discussion (Misc queries) 0 September 1st 09 12:38 AM
Macro to hide rows? Cam Excel Programming 1 April 22nd 08 07:23 PM
Macro to hide rows Alex Excel Programming 1 November 7th 05 07:09 PM
hide rows with macro Alen32 Excel Programming 8 May 27th 05 01:40 PM
hide rows with macro Macro to hide rows in spreadwsheet Excel Discussion (Misc queries) 3 May 12th 05 05:02 PM


All times are GMT +1. The time now is 06:38 AM.

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

About Us

"It's about Microsoft Excel"