Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can someone explain to me why this fails in Excel 2000? They're getting an error: *Microsoft Visual Basic Compile Error: Named Argument Not Found* Code: -------------------- Private Sub Workbook_Open() Dim wSheet As Worksheet Application.ScreenUpdating = False If Worksheets("MasterData").Visible = True Then ' MasterData is visible, keep everything veryhidden For Each wSheet In Worksheets wSheet.Unprotect Password:="cookies2006" wSheet.EnableSelection = xlUnlockedCells If wSheet.Name < "MasterData" Then wSheet.Protect Password:="cookies2006", Contents:=True, UserInterfaceOnly:=True wSheet.Visible = xlSheetVeryHidden Else wSheet.Protect Password:="cookies2006", Contents:=True, UserInterfaceOnly:=True, AllowFormattingColumns:=True wSheet.Visible = xlSheetVisible End If Next Else ' MasterData has been hidden, don't hide other sheets For Each wSheet In Worksheets If wSheet.Visible = True Then ' the sheet's not hidden, un/relock, don't hide wSheet.Unprotect Password:="cookies2006" wSheet.EnableSelection = xlUnlockedCells wSheet.Protect Password:="cookies2006", Contents:=True, UserInterfaceOnly:=True End If Next End If Application.ScreenUpdating = True End Sub -------------------- -- AMK4 ------------------------------------------------------------------------ AMK4's Profile: http://www.excelforum.com/member.php...o&userid=19143 View this thread: http://www.excelforum.com/showthread...hreadid=505475 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2000 error message | New Users to Excel | |||
Excel 2000 error message | New Users to Excel | |||
Error 1004 in Excel 2000 | Excel Programming | |||
Solver error with Excel 2000? | Excel Programming | |||
vba excel 2000 device i/o error | Excel Programming |