Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Macros, Protected Books & Missing Passwords

Hi,

I am running a Macro from one workbook that open another workbook which has it's cells protected. As part of the Macro I enter the password to unprotect the workbook, perform various functions, then reprotect the workbook with the same password.

When I run the Macro it does all that I intended.

If I now open the 2nd workbook, the book is still protected. When I go to choose unprotect, it does without any password!

So even though in the Macro I renter the password, it seems the Macro is protecting the book but without any password!

I've double checked the code and redid the Macro several times all with the same result.

Help!
  #2   Report Post  
Nige
 
Posts: n/a
Default

Hi jamesanddavid - hmm... are you protecting and unprotecting the worksheet
(so individual cells can be locked, etc) and protecting/unprotecting the
workbook?

Probably obvious, but when you re-protect in code, are you specifying the
password for both worksheet and workbook then, and not only when
unprotecting? And again obviously.. you're saving the workbook AFTER you've
set the protection password(s)?

Nige


"jamesanddavid" wrote:


Hi,

I am running a Macro from one workbook that open another workbook which
has it's cells protected. As part of the Macro I enter the password to
unprotect the workbook, perform various functions, then reprotect the
workbook with the same password.

When I run the Macro it does all that I intended.

If I now open the 2nd workbook, the book is still protected. When I go
to choose unprotect, it does without any password!

So even though in the Macro I renter the password, it seems the Macro
is protecting the book but without any password!

I've double checked the code and redid the Macro several times all with
the same result.

Help!


--
jamesanddavid

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Books on writing Macros JC Excel Discussion (Misc queries) 1 January 29th 05 11:45 PM
Running Macros in protected workbook petunia Excel Worksheet Functions 3 January 18th 05 09:24 PM
Is is possible to run macros on a protected worksheet petunia Excel Worksheet Functions 1 January 18th 05 04:55 PM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"