LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hiding Rows

The sheet is protected, userinterfaceonly:= true

The OP already protect it with userinterfaceonly:= true
The macro should run correct


--
Regards Ron de Bruin
http://www.rondebruin.nl


"IC" wrote in message ...
You may also need to unprotect/protect the sheet.

Sub test()
Worksheets(1).Unprotect
' Ron's code
Worksheets(1).Protect
End Sub

Ian

"Ron de Bruin" wrote in message
...
Try this

Sub test()
With ActiveSheet
If .Rows("5:10").EntireRow.Hidden = True Then
.Rows("5:10").EntireRow.Hidden = False
Else
.Rows("5:10").EntireRow.Hidden = True
End If
End With
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"~Danny~" wrote in message

...
I'd like to have a toggle button on a sheet that
alternately hides and unhides a number of rows, say 5:10
Anyone know how?
I keep getting the error "Unable to set the Hidden
property of the range class"

The sheet is protected, userinterfaceonly:= true and
enableselection = xlunlocked cells

Many thanks







 
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
Color alternate rows when after hiding selected rows Monk[_2_] Excel Worksheet Functions 6 June 7th 08 01:36 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding a button when hiding rows fergusor Excel Discussion (Misc queries) 2 August 10th 06 02:31 PM
Hiding Rows if the linked rows are blank KG Excel Discussion (Misc queries) 9 May 18th 05 02:32 AM
Copying Rows when hiding other rows Neutron1871 Excel Worksheet Functions 2 November 3rd 04 11:38 PM


All times are GMT +1. The time now is 12:21 PM.

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"