Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default sharing and protecting incompatible?

Hi,
I'd like to share a workbook made of 3 sheets.
However, I'd like to protect one of the sheets as its content is made
up via macros with the data from the first two sheets.
Unfortunately, the macro will return an error message:

"Unprotect method of Worksheet class failed"
Run-time error '1004'

The macro begins with the following code:
Sheets("Database").Select
ActiveSheet.Unprotect

If I don't share the workbook, the macro works fine.

Is it possible for the macro to unprotect the workbook in order to
perform the data handling?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default sharing and protecting incompatible?

A colleague gave me the solution:
The worksheet was protected to prevent writing, but needed unprotection
to do a "find and replace".
Solution, unlock the relevant column for the "find and replace",
therefore, the macro doesn't need to unprotect the entire sheet. All
columns are protected but that one.

case closed
:-)

PUBA

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
Can't edit a Comment, not protecting, not sharing jsky Excel Discussion (Misc queries) 3 November 10th 07 01:15 AM
Sharing and protecting sections of a worksheet. Ekazakoff Excel Discussion (Misc queries) 1 August 9th 06 02:59 AM
.csv incompatible message after saving smoker Excel Worksheet Functions 1 October 5th 05 04:28 PM
Macros incompatible for different versions? aiyer[_43_] Excel Programming 0 August 17th 04 10:20 PM
Incompatible Code bw Excel Programming 10 July 26th 03 03:04 PM


All times are GMT +1. The time now is 06:15 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"