Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 989
Default Unprotecting not working in Shared workbook

I am using Excel 97.

I have shared a workbook but the unprotecting code which worked fine when it
wasn't shared:

Worksheets("Data").Unprotect Password:="maw3327"

is causing a runtime of 1004, method of unprotecting not available.

To reprotect I am using:

Worksheets("Data").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="maw3327"

I don't know whether this may potentially cause me a probblem because I
can't get that far!

Please can anyone else with a solution.


--
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Unprotecting not working in Shared workbook

Hi Mark,

Shared workbooks are subject to a number of limitations.

See Limitations of shared workbooks in Excel help.

Pertinently, help says (inter alia):

'==================( Start quote)
In a shared workbook, you cannot do the following:


[cut]

Passwords
Assign a password to protect individual worksheets or the entire workbook.
Protection that you applied before sharing the workbook remains in effect
after you share the workbook.

Change or remove passwords. Passwords that you assigned before sharing the
workbook remain in effect after you share the workbook.
<<================== (End Quote)



---
Regards,
Norman



"Mark" wrote in message
...
I am using Excel 97.

I have shared a workbook but the unprotecting code which worked fine when
it
wasn't shared:

Worksheets("Data").Unprotect Password:="maw3327"

is causing a runtime of 1004, method of unprotecting not available.

To reprotect I am using:

Worksheets("Data").Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True, Password:="maw3327"

I don't know whether this may potentially cause me a probblem because I
can't get that far!

Please can anyone else with a solution.


--
Mark



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unprotecting not working in Shared workbook


Try:

Password = "maw3327"
ActiveSheet.Protect Password, True, True, True


Password = "maw3327"
ActiveSheet.Unprotect Password


--
Losse
------------------------------------------------------------------------
Losse's Profile: http://www.excelforum.com/member.php...o&userid=24813
View this thread: http://www.excelforum.com/showthread...hreadid=388272

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
Shared workbook-header not working Mary jane Excel Discussion (Misc queries) 4 February 9th 10 07:17 PM
Some macros not working on shared workbook KevHardy Excel Discussion (Misc queries) 8 February 8th 10 07:39 AM
VBA Code not working on Shared Workbook KC_Cheer_Coach Excel Worksheet Functions 3 April 7th 09 06:09 PM
Shared Workbook not working jazztpt Excel Discussion (Misc queries) 0 May 27th 07 12:24 PM
activesheet.tab.colorindex not working when workbook shared Martin Appleton Excel Discussion (Misc queries) 0 July 21st 06 08:45 AM


All times are GMT +1. The time now is 11:03 PM.

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"