Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Way to by pass PW to hide sheet

Hello,

I have a sheet in my workbook that need to be protected, then hidden. I
need to write a macro to perform these task.
I ran into the problem with the macro because the sheet can not be
protected in order to be protected. It gave me an error.

Is there a way in the macro to protected the sheet then hide the sheet
by ignoring the protection? Thanks

Cameron

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Way to by pass PW to hide sheet

Try some code like the following:

Dim WS As Worksheet
Set WS = Worksheets("Sheet1")
WS.Visible = xlSheetHidden
WS.Protect Password:="ThePassword"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Cam Hua" wrote in message
...
Hello,

I have a sheet in my workbook that need to be protected, then
hidden. I
need to write a macro to perform these task.
I ran into the problem with the macro because the sheet can not
be
protected in order to be protected. It gave me an error.

Is there a way in the macro to protected the sheet then hide
the sheet
by ignoring the protection? Thanks

Cameron

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply
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
I forgot my password, how do I open a sheet if I forgot the pass Hector Solorzano Excel Worksheet Functions 4 February 20th 13 05:08 AM
Unprotecting a work sheet with out knowledge of pass word. William Excel Worksheet Functions 2 November 21st 08 06:24 PM
Forgot my pass word for excel sheet Suresh Excel Worksheet Functions 1 April 4th 06 01:50 PM
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? Daniel[_14_] Excel Programming 1 August 29th 04 01:20 PM
hide sheet? uncheck sheet tabs? or ??? NetComm888 Excel Programming 1 February 10th 04 04:38 AM


All times are GMT +1. The time now is 12:52 AM.

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

About Us

"It's about Microsoft Excel"