Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hello.
I have a file that has multiple worksheets, each are protected (locked) with a similar password for each worksheet. Is there a way to unprotect all worksheets all at once without having to click on each sheet and unprotect it that way? Is there a Macro? Or something? Thank you! Storm |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Option Explicit
sub testme() dim myPWD as string dim wks as worksheet myPWD = "hi" for each wks in activeworkbook.worksheets wks.unprotect password:=mypwd next wks end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm (Untested, uncompiled--watch for typos!) Storm wrote: Hello. I have a file that has multiple worksheets, each are protected (locked) with a similar password for each worksheet. Is there a way to unprotect all worksheets all at once without having to click on each sheet and unprotect it that way? Is there a Macro? Or something? Thank you! Storm -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Dave,
I just about gave up...thought no one would respond. Yes, unfortunately, I am not that adept with creating macros thru VB script. I will read up on the reference you indicated. Thank you. For the mean time, do I simply copy paste your script below on the VB Script editor and just replace the "hi" with my actual password? Thanks again, Storm "Dave Peterson" wrote: Option Explicit sub testme() dim myPWD as string dim wks as worksheet myPWD = "hi" for each wks in activeworkbook.worksheets wks.unprotect password:=mypwd next wks end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm (Untested, uncompiled--watch for typos!) Storm wrote: Hello. I have a file that has multiple worksheets, each are protected (locked) with a similar password for each worksheet. Is there a way to unprotect all worksheets all at once without having to click on each sheet and unprotect it that way? Is there a Macro? Or something? Thank you! Storm -- Dave Peterson |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Yep. Except this is VBA, not VBScript.
Take a look at David McRitchie's site. You'll find details there. Storm wrote: Hi Dave, I just about gave up...thought no one would respond. Yes, unfortunately, I am not that adept with creating macros thru VB script. I will read up on the reference you indicated. Thank you. For the mean time, do I simply copy paste your script below on the VB Script editor and just replace the "hi" with my actual password? Thanks again, Storm "Dave Peterson" wrote: Option Explicit sub testme() dim myPWD as string dim wks as worksheet myPWD = "hi" for each wks in activeworkbook.worksheets wks.unprotect password:=mypwd next wks end sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm (Untested, uncompiled--watch for typos!) Storm wrote: Hello. I have a file that has multiple worksheets, each are protected (locked) with a similar password for each worksheet. Is there a way to unprotect all worksheets all at once without having to click on each sheet and unprotect it that way? Is there a Macro? Or something? Thank you! Storm -- Dave Peterson -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
locking and unlocking worksheets | Excel Worksheet Functions | |||
Run a macro on multiple worksheets? | Excel Discussion (Misc queries) | |||
MACRO AND MULTIPLE WORKSHEETS | Excel Worksheet Functions | |||
Use a macro on multiple Worksheets | Excel Discussion (Misc queries) | |||
Macro to email multiple worksheets | Excel Worksheet Functions |