Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Workbooks and Password Protect all Worksheets
Hi all, I need macro which should open all excel workbooks one by one
in folder "C:\Document\Record\" and protect all worksheets in each workbook with password "REC". I tried few my own experiments but I am not getting any success. Please can any friend can help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open Workbooks and Password Protect all Worksheets
Hi K
Here is a basic macro http://www.rondebruin.nl/copy4.htm Replace the red code block with something like this On Error Resume Next For Each sh In mybook.Worksheets If sh.ProtectContents = False Then With sh .Protect = "REC" End With Else ErrorYes = True End If Next sh -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "K" wrote in message ... Hi all, I need macro which should open all excel workbooks one by one in folder "C:\Document\Record\" and protect all worksheets in each workbook with password "REC". I tried few my own experiments but I am not getting any success. Please can any friend can help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to password protect multiple workbooks? | Excel Discussion (Misc queries) | |||
Linking to Password Protect Workbooks | Excel Discussion (Misc queries) | |||
Password Protect Multiple Workbooks | Excel Discussion (Misc queries) | |||
password protect copies of workbooks | Excel Discussion (Misc queries) | |||
Password protect a folder with several workbooks | Excel Discussion (Misc queries) |