VAB Error

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

Nev

I have a spreadsheet which works without problems on clients computor
using Win 98, Win Me and XP, when I run it on my own laptop with Wi
200 i have a error when the code reaches
With
End With
when I get a runtime error 9
"subscript out of range"
any ideas why
tnaks
Nevill
 
The part of the full code is:-
Private Sub UserForm_Initialize()
Dim Row As Integer, i As Integer, RangeRow As Integer
Dim vaJobNo As Variant
Dim vaWaste As Variant
Dim intWaste() As Integer
Dim rngJobs As Range
Dim LastRow As Integer

error here
With
Workbooks("Time_Sheet").Worksheets("Job_Number").Range("A1").SpecialCells(xlCellTypeLastCell)
LastRow = .Row
End With
vaWaste = VBA.Array(10, 15, 20, 30, 40, 50, 50, 100)
vaJobNo = Workbooks("Time_Sheet").Worksheets("Job_Number").Range("A2:B"
& LastRow & "")
vaJobNo = Range("A2:B" & Row & "")
cboJobNo.List = vaJobNo


Also
Dim vaPage As Variant, Row As Integer, RowSoft As Integer, RowHard As
Integer, RowPly As Integer
Dim wbTime As Workbook, RowCarcase As Integer
Dim strWorkBook As String, strMat As String, strPly As String
Dim dblWaste As Double, dblTCost As Double, dblPCost As Double
On Error Resume Next
strMat = cboTimber
strPly = cboPly
vaData = rgData.Value
Error here!!!
With
Workbooks("Time_Sheet").Worksheets("Job_Number").Range("A1").SpecialCells(xlCellTypeLastCell)
Row = .Row
End With
With
Workbooks("Materials").Worksheets("Sheet_Mat").Range("A1").SpecialCells(xlCellTypeLastCell)
RowPly = .Row
End With
With
Workbooks("Materials").Worksheets("Hardwood").Range("A1").SpecialCells(xlCellTypeLastCell)
RowHard = .Row
End With
With
Workbooks("Materials").Worksheets("Softwood").Range("A1").SpecialCells(xlCellTypeLastCell)
RowSoft = .Row
End With
With
Workbooks("Materials").Worksheets("Carcassing").Range("A1").SpecialCells(xlCellTypeLastCell)
RowCarcase = .Row
End With

Thanks for your interest
 
Sorry Mate Can't help, this is the Access forum you need the Excel
forum... I'll report it to a moderator and they will probally move it
to the correct forum for you...
 
Back
Top