Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Share Workbook/Protect Sheet Question | Excel Discussion (Misc queries) | |||
I need to share and also protect certain cells. | Excel Discussion (Misc queries) | |||
Custom views, filters sensitive, in a share workbook an protect sh | New Users to Excel | |||
How to protect the share workbooK | Excel Worksheet Functions | |||
share a workbook but protect the formulas | Excel Discussion (Misc queries) |