Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to password protect several excel workbook pages using a macro
I can write a macro to protect lots of pages in a big workbook, but they are
protected without a password. How can I password protect them? I use Excel 2000. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to password protect several excel workbook pages using a macro
In Help, look up the syntax for the Protect method of the worksheet. (In the
immediate window, type protect, then press F1.) Help has everything you want to know. On Mon, 27 Sep 2004 21:27:02 -0700, "p88t" wrote: I can write a macro to protect lots of pages in a big workbook, but they are protected without a password. How can I password protect them? I use Excel 2000. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to password protect several excel workbook pages using a macro
Assume by "pages" you mean "worksheets".
Sub ProtectAllSheets() Application.ScreenUpdating = False Dim N As Single For N = 1 To Sheets.Count Sheets(N).Protect Password:="justme" Next N Application.ScreenUpdating = True End Sub Sub UnprotectAllSheets() Application.ScreenUpdating = False Dim N As Single For N = 1 To Sheets.Count Sheets(N).Unprotect Password:="justme" Next N Application.ScreenUpdating = True End Sub Gord Dibben Excel MVP On Mon, 27 Sep 2004 21:27:02 -0700, "p88t" wrote: I can write a macro to protect lots of pages in a big workbook, but they are protected without a password. How can I password protect them? I use Excel 2000. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to remove password protect to open Excel 2007 workbook | Excel Discussion (Misc queries) | |||
How do I password protect an excel workbook? | Excel Discussion (Misc queries) | |||
How do I password protect a workbook in Excel? | Excel Discussion (Misc queries) | |||
Password Protect a Workbook ? | New Users to Excel | |||
password protect workbook | Excel Discussion (Misc queries) |