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: 10
Default Page Protection interfering with Hiding Rows

have a sheet that hides groups of rows based on a cell's information.
I'd prefer this to happen automatically through VBA, but currently I'm
stuck using a Toggle Button to hide/unhide these rows.

The problem I run into though is that that toggle button works
brilliantly until I turn on the page protection. Once I turn on the
protection I keep getting errors that the page is protected and can't
be updated.


And due to the fact that the people who will be using this know
absolutely no Excel at all and break formulas on the old sheet
regularly... well, the sheet has to be write-protected.


The code I'm currently using is this:
Sub DENYPASS()


Application.ScreenUpdating = False
Application.EnableEvents = False


If Range("B2") = 1 Then
Rows("11:41").EntireRow.Hidden = True
Rows("42:72").EntireRow.Hidden = False
Else
Rows("11:41").EntireRow.Hidden = False
Rows("42:72").EntireRow.Hidden = True
End If


Application.ScreenUpdating = True
Application.EnableEvents = True


End Sub


with a private sub to connect it to the Toggle Button


Private Sub passdeny_Click()
DENYPASS
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
Run-time error 1004 while conditionally hiding rows as a result ofworksheet protection ran58 Excel Discussion (Misc queries) 2 July 22nd 09 07:42 AM
Hiding rows with cells locked using format protection lock functio John G.[_2_] Excel Discussion (Misc queries) 3 May 7th 08 12:14 AM
Worksheet protection interfering with data validation combo box pr Lele Excel Discussion (Misc queries) 1 March 4th 07 07:51 PM
Page Protection interfering with Hiding Rows [email protected] Excel Worksheet Functions 3 August 3rd 06 02:38 PM
Hiding the page number in page break preview background. I need coffee, wake me up! Excel Discussion (Misc queries) 0 May 15th 06 10:32 AM


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