Hiding and protecting sheet without crashing Excel!
Hi,
I would like to hide a sheet and protect it at the same time. Excel crashes if I use the "hide" menu and then write the following code in the Sub Workbook_Open(): With Worksheets("sheet1") .EnableSelection = xlUnlockedCells .Protect Contents:=True, Password:="xxx", DrawingObjects:=True, UserInterfaceOnly:=True End With Any suggestion? Thanks |
Hiding and protecting sheet without crashing Excel!
Set the worksheet's .Visible = 2
That will make the sheet "Very" hdden. It won't even show up on th unhide menu. Does that work for you? - Piku -- Message posted from http://www.ExcelForum.com |
Hiding and protecting sheet without crashing Excel!
Wonderful! Thanks
-----Original Message----- Set the worksheet's .Visible = 2 That will make the sheet "Very" hdden. It won't even show up on the unhide menu. Does that work for you? - Pikus --- Message posted from http://www.ExcelForum.com/ . |
All times are GMT +1. The time now is 09:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com