Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Share a workbook and protect


I write some code in VBA to make a sheet automatically hide/unhide som
ranges according to a n input box. Also I want to protect some part o
the sheet so that the values can only be viewed but not editable
Finally I share the workbook to a group so that others can enter thei
names to edit their own part of the sheet.

Questions:

I do not know how to share a workbook in VBA code.

If I share the workbook without VBA, I found that m
"protect/unprotect" code in VBA conflicting with the Share Condition.

Any help?

Thank

--
Jason
-----------------------------------------------------------------------
Jasons's Profile: http://www.excelforum.com/member.php...fo&userid=1610
View this thread: http://www.excelforum.com/showthread.php?threadid=27554

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 52
Default Share a workbook and protect

Start a new workbook and turn on the macro recorder (so the code gets recorded
in this "helper" workbook.)

Then swap back to your real workbook (unshare it first) and share it.

I get this code:

ActiveWindow.ActivateNext
ActiveWorkbook.KeepChangeHistory = True
ActiveWorkbook.SaveAs Filename:="C:\My Documents\excel\book5.xls", _
AccessMode:=xlShared

But the other question is a problem. You can't change protection of a worksheet
within a shared workbook. (and that applies no matter how you applied
sharing--via the user interface or via code.)

Look in Excel's help for "Features that are unavailable in shared workbooks"

You may be disappointed in all the things you can't do.





Jasons wrote:

I write some code in VBA to make a sheet automatically hide/unhide some
ranges according to a n input box. Also I want to protect some part of
the sheet so that the values can only be viewed but not editable.
Finally I share the workbook to a group so that others can enter their
names to edit their own part of the sheet.

Questions:

I do not know how to share a workbook in VBA code.

If I share the workbook without VBA, I found that my
"protect/unprotect" code in VBA conflicting with the Share Condition.

Any help?

Thanks

--
Jasons
------------------------------------------------------------------------
Jasons's Profile: http://www.excelforum.com/member.php...o&userid=16108
View this thread: http://www.excelforum.com/showthread...hreadid=275549


--

Dave Peterson

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
Share Workbook/Protect Sheet Question Johnny Excel Excel Discussion (Misc queries) 2 October 4th 07 07:14 PM
I need to share and also protect certain cells. Ekazakoff Excel Discussion (Misc queries) 0 August 2nd 06 05:08 PM
Custom views, filters sensitive, in a share workbook an protect sh Andre Fernandes New Users to Excel 0 October 31st 05 09:36 PM
How to protect the share workbooK Calculate Date range Excel Worksheet Functions 0 September 19th 05 12:02 PM
share a workbook but protect the formulas clemrogan Excel Discussion (Misc queries) 2 August 9th 05 09:25 PM


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