![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
Is it possible whilst running a macro to un-protect a password protected worksheet without the user being prompted to enter a password, then running whatever macro code has been written, then re-protecting the worksheet with the same password, again without the user being prompted for a password?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 10,382
|
The general syntax within your procedure could be something like:
ActiveSheet.Unprotect ("PASSWORD") 'Your code goes here ActiveSheet.Protect ("PASSWORD") Of course, modify for actual password characters. Tom Urtis |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
Many Thanks Tom, it works well.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|