I have the following code in an Excel Workbook. It works fine in Excel 2000 but not in Excel 2003.
Private Sub Workbook_Open()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Application.EnableAutoComplete = False
ActiveWindow.DisplayZeros = True
Worksheets("TIME AND LEAVE").Range("C31,E31,G31,I31,K31,M31,O31").FormulaR1C1 = "=IF(ABS(R[-21]C[1]-RC[1])>0.000001,""ERROR"","""")"
Worksheets("TIME AND LEAVE").Protect UserInterfaceOnly:=True
End Sub
The Protect UserInterfaceOnly: = True statememt causes a Sheet Password InputBox to appear when the application is opened requesting a password.
The .Range("C31, E31, .......).FormulaR1C1 causes an error also.
Any idea why this script works in 2000 but not in 2003? Thanks
Private Sub Workbook_Open()
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
Application.EnableAutoComplete = False
ActiveWindow.DisplayZeros = True
Worksheets("TIME AND LEAVE").Range("C31,E31,G31,I31,K31,M31,O31").FormulaR1C1 = "=IF(ABS(R[-21]C[1]-RC[1])>0.000001,""ERROR"","""")"
Worksheets("TIME AND LEAVE").Protect UserInterfaceOnly:=True
End Sub
The Protect UserInterfaceOnly: = True statememt causes a Sheet Password InputBox to appear when the application is opened requesting a password.
The .Range("C31, E31, .......).FormulaR1C1 causes an error also.
Any idea why this script works in 2000 but not in 2003? Thanks