Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default password protecting sheet when workbook opens


I want a sheet in my workbook to be automatically protected when i
opens. So, I put this into 'ThisWorkbook':

Private Sub Workbook_Open()
Password = "jack"
ThisWorkbook.Sheets("invoice list").Protect Password:=Password
End Sub

Then I closed the workbook, reopened it, and the sheet was protected
However, I am now unable to unprotect it, as I keep getting told tha
I've got the wrong password!

Firstly, does anyone know how I can unprotect this? Secondly, what di
I do wrong? how can I get this to work?

Thanks!

--
mercer7
-----------------------------------------------------------------------
mercer77's Profile: http://www.excelforum.com/member.php...fo&userid=3148
View this thread: http://www.excelforum.com/showthread.php?threadid=51164

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default password protecting sheet when workbook opens


ok, I managed to unprotect it using this rather impressive tool:
http://www.pcworld.com/downloads/fil...d,22990,00.asp

But, I still don't understand why this happened. Any ideas

--
mercer7
-----------------------------------------------------------------------
mercer77's Profile: http://www.excelforum.com/member.php...fo&userid=3148
View this thread: http://www.excelforum.com/showthread.php?threadid=51164

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default password protecting sheet when workbook opens


Problem solved!

This seems to work, basically specifying the workbook. I don'
understand the difference - I guess it's just one of those littl
mysteries.... :)

Private Sub Workbook_Open()
Dim Password
Password = "jack"
Workbooks("INVOICESv2a.XLS").Sheets("invoice list").Protec
Password:=Password
End Su

--
mercer7
-----------------------------------------------------------------------
mercer77's Profile: http://www.excelforum.com/member.php...fo&userid=3148
View this thread: http://www.excelforum.com/showthread.php?threadid=51164

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
Password Protecting a workbook Maryann Excel Discussion (Misc queries) 2 April 14th 10 03:10 PM
What if I forgot the password protecting an excel workbook? Marina Excel Discussion (Misc queries) 1 March 9th 10 03:34 PM
Password protecting sheets in a workbook Les[_2_] Excel Worksheet Functions 4 February 24th 07 06:38 PM
Sheet Protecting password Nick Excel Discussion (Misc queries) 1 June 30th 05 12:43 AM
Protecting Sheet with Password halem2[_20_] Excel Programming 3 September 17th 04 01:58 AM


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