VBA Error

  • Thread starter Thread starter Nev
  • Start date Start date
N

Nev

I have a Excel Spreadsheet which runs without problems on both Windows
2000, and Windows XP, but when I run the spreadsheet on my laptop with
Windows 2000 I get the following error code.

Microsoft Visual Basic

Run-time error '9'

Subscript out of range

code stops hear:

With
Workbooks("Time_Sheet").Worksheets("Data_Entry").Range("A1").SpecialCells(xlCellTypeLastCell)
End With

With Range("A1").SpecialCells(xlCellTypeLastCell)
Row = .Row
Workbooks("Time_Sheet").Worksheets("Data_Entry").Names.Add
Name:="Database", RefersToR1C1:="=Data_Entry!R1C1:R" & Row & "C39"
End With

I have checked the references which are the identical. Excel is Office
Professional XP

Can anyone help?

Nev
 
When I had an issue with this, I made sure that the file extension was
included.

Workbooks("Time_Sheet.xls")

HTH
Paul
 
Back
Top