Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Ensure sheet is saved password Protected

All

Need to be able to protect my spreadsheet once it is closed down.

Is it possible to ensure to do the following:

1) With every sheet in workbook
- Protect all sheets
- Set password of "Test"

2) Would need this to happen when the spreadsheet is closed down, so assume I
could just put this in Auto_Close module?

I know its not normally advised to put the password within the module itself,
however need to ensure that the sheet is not shut down without being protected
first.

Appreciate any help you can offer on the above.

Many Thanks, Al Mackay ( )
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Ensure sheet is saved password Protected

Try this:


Sub ProtectSheets()
strPWord = "Test"
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Protect strPWord
Next
End Sub

Abdul Salam


-----Original Message-----
All

Need to be able to protect my spreadsheet once it is

closed down.

Is it possible to ensure to do the following:

1) With every sheet in workbook
- Protect all sheets
- Set password of "Test"

2) Would need this to happen when the spreadsheet is

closed down, so assume I
could just put this in Auto_Close module?

I know its not normally advised to put the password

within the module itself,
however need to ensure that the sheet is not shut down

without being protected
first.

Appreciate any help you can offer on the above.

Many Thanks, Al Mackay ( )
.

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
How to ensure workbook is saved before exiting Excel? Kathy Love Excel Discussion (Misc queries) 6 December 9th 09 09:18 PM
Lost Password of a protected Sheet ibgolfn Excel Discussion (Misc queries) 2 April 7th 08 09:45 PM
can u tell me where are excel sheet password saved Excel sheet password Excel Discussion (Misc queries) 1 December 30th 06 10:43 AM
no password for protected sheet TJaques Excel Worksheet Functions 3 July 27th 06 05:51 PM
password protected Sheet thrava Excel Discussion (Misc queries) 4 December 29th 04 07:54 PM


All times are GMT +1. The time now is 01:20 AM.

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"