Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to ensure workbook is saved before exiting Excel? | Excel Discussion (Misc queries) | |||
Lost Password of a protected Sheet | Excel Discussion (Misc queries) | |||
can u tell me where are excel sheet password saved | Excel Discussion (Misc queries) | |||
no password for protected sheet | Excel Worksheet Functions | |||
password protected Sheet | Excel Discussion (Misc queries) |