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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared Workbook Problem

Status
Not open for further replies.

ribhead

Technical User
Jun 2, 2003
384
US
First question.
Is there a way to get around protecting sheets in a shared workbook?

Second question.

In a shared workbook is there a way that a user can open the workbook up and not have to be asked if it should be saved?

Any help would be great!!

I may not be very smart but I'm sure wirey!!!!
 
What do you mean "get around protecting sheets" ??
Generally, for a shared workbook, ALL formatting, setup should be done BEFORE the workbook is made shared.


Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
ribhead
1) What are you trying to do? Do you mean you want to protect the data on a sheet without protecting the sheet itself? If so you could cancel the change in the Worksheet_Change event for the sheet.

2) Again, what exactly are you trying to do? Do you want to abort all changes when the book is closed? Or do you want to automatically save all changes when the book is closed? Either way, you can probably find some way to do it with the Workbook_BeforeSave event.
 
Well, what I was origniall doing was using a shared workbook and inputing data using forms. I was trying to protect and unprotect while the sheets were shared but I kept getting an Error. I just wanted to make sure that when the user is looking at this shared workbook that he/she couldn't change any information. I don't know if this makes sense so I hope you don't want to kill me too much.

I may not be very smart but I'm sure wirey!!!!
 
You can't put protection on or take it off whilst the workbook is in SHARED mode. As I said - any formatting / changes that need to be done should be done BEFORE the workbook is made "Shared". To change, you need to unshare the workbook. Not sure if it'll work but you could try using
Sheets("Sheetname").protect userinterfaceonly:=true
in a the workbook open event. This means that for the user, it will appear as though the worksheet is protected but it can still be manipulated via code.....

Rgds
Geoff
Si hoc legere scis, nimis eruditionis habes
 
Thanks I'll give it a try.

I may not be very smart but I'm sure wirey!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top