Kuldeep singh
New Member
Hi,
Please help me i am getting error on using below Vb code from excel:
[pre]
[/pre]
And Below is the sample excel data which i trying to get:
UTRNO/CC No
--------------
VYSAH13133605078
VYSAH13133605079
VYSAH13133605080
262820
262821
First three rows value getting in VB but on fourth row vb showing me error of "Invalid use of Null". However, i want the value from excel cell into a variable, so that i can use it further.
Thanks in adavance.
Please help me i am getting error on using below Vb code from excel:
[pre]
Code:
Dim recPayment As New Recordset '************ Fields declar for read excel file
'************* Connection to the excel file *************
connString = "DRIVER=Microsoft Excel Driver (*.xls);" & "DBQ=" & inputPath
recPayment.Open "select * from [Sheet1$]", connString
F1 = App.Path & XMLPath
Close #1
Open F1 For Output As #1
VoucherType = "Payment"
recPayment.MoveFirst
Print #1, StrEnvelop
Do While Not recPayment.EOF
VoucherNumberPay = recPayment.Fields(1).Value
recPayment.MoveNext
Loop
Print #1, StrEnd
Close #1
And Below is the sample excel data which i trying to get:
UTRNO/CC No
--------------
VYSAH13133605078
VYSAH13133605079
VYSAH13133605080
262820
262821
First three rows value getting in VB but on fourth row vb showing me error of "Invalid use of Null". However, i want the value from excel cell into a variable, so that i can use it further.
Thanks in adavance.