Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locking & Unlocking Shared Excel workbook

Status
Not open for further replies.

drkestrel

MIS
Sep 25, 2000
439
GB
Environment:
-Windows XP Professional SP2
-Excel in Office XP (Version 10.4302.4219) SP2

I have an XLS file, with multiple worksheets in them, each worksheet is password protected, and a lot of cells within them are locked.

I have some VBA code (invoked from a button in each form) that would:
- Unlock the worksheet
- make some changes to the worksheet
- Lock the worksheet

Furthermore, the XLS workbook has been made Shared for editing by multiple users and history kept for 3 days.

All these has been working all along, until today when I get Applicaton defined or object Error. Adding debug lines reveals that the error occurs whilst code is trying to unlock worksheet. I know the "Protect"/"Unprotect" worksheet item is dimmed as the workbook was shared, but don't know why it has been working all along until now!
 
By chance have you checked that the password is still the same and didn't get changed somehow?

VBAjedi [swords]
 
No, I have not changed the password.

Also, does not explain why the spreadsheet works again as soon as I unshared the workbook!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top