954,557 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Unprotecting a worksheet of a shared workbook in VB6?

DISREGARD
EDIT: found an answer.

--------------------------------------------------------------------------------------------


Trying to unprotect a protected worksheet, write to a cell and protect it again. The following code works ok if the workbook is not shared:

ActiveSheet.Unprotect
        Range("D18").Value = 1
        ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True


However, when the workbook is shared for network use this results in the error:Run-time error '1004':

Unprotect method of Worksheet class failed

Um.....help?

Swoop_GB
Newbie Poster
12 posts since Feb 2011
Reputation Points: 16
Solved Threads: 0
 

Nice in solving your own problem, keep it up.:)

Please mark this as solved, thanks.

AndreRet
Senior Poster
3,922 posts since Jan 2008
Reputation Points: 334
Solved Threads: 350
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You