M
mls via AccessMonster.com
My code below shows run-time error 6 overflow at lot_number = farray(0).
some how the number is not captured. It should show 705302. Any thoughts?
Sub test()
FileName = "705302 build postfill 01-27-2010 sns "
Dim farray() As String
Dim lot_number As Integer
Dim Material As String
Dim Serialno As Integer
farray = Split(FileName, " ")
If (IsNumeric(farray(0))) Then
lot_number = farray(0)
Else
lot_number = 0
End If
Material = farray(1) & " " & farray(2)
'Serailno = farray(3)
MsgBox Material
If (IsNumeric(farray(4))) Then
Serialno = farray(4)
Else
Serialno = 0
End If
MsgBox Serialno
End Sub
some how the number is not captured. It should show 705302. Any thoughts?
Sub test()
FileName = "705302 build postfill 01-27-2010 sns "
Dim farray() As String
Dim lot_number As Integer
Dim Material As String
Dim Serialno As Integer
farray = Split(FileName, " ")
If (IsNumeric(farray(0))) Then
lot_number = farray(0)
Else
lot_number = 0
End If
Material = farray(1) & " " & farray(2)
'Serailno = farray(3)
MsgBox Material
If (IsNumeric(farray(4))) Then
Serialno = farray(4)
Else
Serialno = 0
End If
MsgBox Serialno
End Sub