L
Lydia
I created and used the following code in Excel 2000 with
no problems:
Private Sub Workbook_Open()
If Worksheets("BudgetForm").Protect = False Then
Worksheets("BudgetForm").Range("g16:g19").Locked = False
Worksheets("BudgetForm").Range("h16:h19").Locked = False
Worksheets("BudgetForm").Range("h25:h29").Locked = False
Worksheets("BudgetForm").Range("g31:g47").Locked = False
Worksheets("BudgetForm").Protect Contents:=True,
Objects:=True, Scenarios:=True
End If
ActiveWorkbook.Protect Structure:=True, Windows:=False
Range("A1").Select
End Sub
But since I have upgraded to Excel 2002, I get an error
message when opening the workbook. The highlighted code is
the second line.
Any help is appreciated!
no problems:
Private Sub Workbook_Open()
If Worksheets("BudgetForm").Protect = False Then
Worksheets("BudgetForm").Range("g16:g19").Locked = False
Worksheets("BudgetForm").Range("h16:h19").Locked = False
Worksheets("BudgetForm").Range("h25:h29").Locked = False
Worksheets("BudgetForm").Range("g31:g47").Locked = False
Worksheets("BudgetForm").Protect Contents:=True,
Objects:=True, Scenarios:=True
End If
ActiveWorkbook.Protect Structure:=True, Windows:=False
Range("A1").Select
End Sub
But since I have upgraded to Excel 2002, I get an error
message when opening the workbook. The highlighted code is
the second line.
Any help is appreciated!