Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protect UserInterfaceOnly = True problems with Excel 2003

Status
Not open for further replies.

ACH381

Technical User
Apr 3, 2002
49
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top