Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can anyone help with this....i need to protect and unprotect a sheet i a shared workbook but i cant work it out can anyone help heres the cod i have. Thanks, Simon Sub auto_close() Sheets("Holidays").Select ActiveSheet.Unprotect With Application .Calculation = xlManual .MaxChange = 0.001 .CalculateBeforeSave = False End With ActiveWorkbook.PrecisionAsDisplayed = False Range("A14:AK545").Select Selection.sort Key1:=Range("A14"), Order1:=xlAscending Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom _ DataOption1:=xlSortNormal Range("a1").Select Application.DisplayAlerts = False Application.DisplayFormulaBar = True ActiveCell = xlNone With Application .Calculation = xlAutomatic End With ActiveSheet.Protect ActiveWorkbook.Save End Su -- Simon Lloy ----------------------------------------------------------------------- Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670 View this thread: http://www.excelforum.com/showthread.php?threadid=37603 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Extract from help:
Features not available in shared workbooks: Protect or unprotect worksheets or the workbook -- Regards, Tom Ogilvy "Simon Lloyd" wrote in message ... Can anyone help with this....i need to protect and unprotect a sheet in a shared workbook but i cant work it out can anyone help heres the code i have. Thanks, Simon Sub auto_close() Sheets("Holidays").Select ActiveSheet.Unprotect With Application Calculation = xlManual MaxChange = 0.001 CalculateBeforeSave = False End With ActiveWorkbook.PrecisionAsDisplayed = False Range("A14:AK545").Select Selection.sort Key1:=Range("A14"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Range("a1").Select Application.DisplayAlerts = False Application.DisplayFormulaBar = True ActiveCell = xlNone With Application Calculation = xlAutomatic End With ActiveSheet.Protect ActiveWorkbook.Save End Sub -- Simon Lloyd ------------------------------------------------------------------------ Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708 View this thread: http://www.excelforum.com/showthread...hreadid=376031 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
shared workbook is set up is not 'shared' on network | Excel Worksheet Functions | |||
shared workbook - shared workbook options grayed out | Excel Discussion (Misc queries) | |||
Printing viewing a shared workbook on a shared drive | Excel Discussion (Misc queries) | |||
update pivot in shared shared workbook | Excel Discussion (Misc queries) | |||
using a password to in connection with macro protectio | Excel Programming |