ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hiding rows in a protected sheet in Excel 2003 (https://www.excelbanter.com/excel-programming/284338-hiding-rows-protected-sheet-excel-2003-a.html)

Urban

Hiding rows in a protected sheet in Excel 2003
 
I have a spreadsheet that was developed in Excel 2000.
This spreadsheet is using lots of hiding of rows to
customize it for the user. It works fine in 97, 2000 and
Xp. But in 2003 I had to add lots of lines of code to
unprotect the document every time a row is opened or
closed. Are there any ways around this as it makes the
program very slow even on a fast computer.

Best regards,

Urban


Jim Rech

Hiding rows in a protected sheet in Excel 2003
 
Can you provide a simple example that demonstrates the problem?

As far as I know Excel 2003 is no different that earlier Excels. If a
worksheet is protect in code with UserInterfaceOnly set to True then a macro
can hide rows with the worksheet protected. If UserInterfaceOnly is not
true then the macro will error trying to hide a row.

--
Jim Rech
Excel MVP



No Name

Hiding rows in a protected sheet in Excel 2003
 
Thnaks for the help. Here is a sample how it is done.

Private Sub HideL_Project_Type()

' Opens and closes sections relevant to selected project

Range("HideL_Arena").EntireRow.Hidden = True
Range("HideL_Retail").EntireRow.Hidden = True

If Range("HideCodeL_Proj").Value = 1 Then

Range("HideL_Arena").EntireRow.Hidden = False


ElseIf Range("HideCodeL_Proj").Value = 2 Then

Range("HideL_Retail").EntireRow.Hidden = False

End If

End Sub


We are using pulldown menues to select different types of
options.

You can also go to our web site www.retscreen.net and
download any of our programs. I tried the Biomass model on
Excel 2003 and it totally crashes. We have about 37,000
users for these programs so we need a fix. I will try your
suggestion later today.

When I tried using unprotect before every Hidden statement
it started to work again.

Thanks,

Urban


-----Original Message-----
Can you provide a simple example that demonstrates the

problem?

As far as I know Excel 2003 is no different that earlier

Excels. If a
worksheet is protect in code with UserInterfaceOnly set

to True then a macro
can hide rows with the worksheet protected. If

UserInterfaceOnly is not
true then the macro will error trying to hide a row.

--
Jim Rech
Excel MVP


.


Jim Rech

Hiding rows in a protected sheet in Excel 2003
 
Any chance you could email me the Biomass file? I really don't want to go
through the registration process on your site. Thanks.

--
Jim Rech
Excel MVP




All times are GMT +1. The time now is 11:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com