So a friend of mine has a small business has a very small ms access database and uses it to export to excel on occasion. recently some of the code the person who set up for her has screwed up, I said i would try to fix it so now here i am. please be patient. This is the code it gives a runtime 13 error when run. I am also wondering what the sub detection is doing and value for variable intcount is after the code executes? Any help is appreciated
Sub detection ()
Dim i As Integer
Dim intcount, intdrawing, intserial as integer
dim strbarcode as string
intcount = 0
i=1
while worksheets("sheet1").cells(i,1).Value<>""
intdrawing = clnt(worksheets("sheet1").cells(i,1).Value)
intserial = clnt(worksheets("sheet1").cells(i,2).Value)
strbarcode = worksheets("sheet1").cells(i,3).Value
If intdrawing = 48 and left(strbarcode,2) = "fe" then intcount + 1
i = i + 1
Wend
End Sub
Sub detection ()
Dim i As Integer
Dim intcount, intdrawing, intserial as integer
dim strbarcode as string
intcount = 0
i=1
while worksheets("sheet1").cells(i,1).Value<>""
intdrawing = clnt(worksheets("sheet1").cells(i,1).Value)
intserial = clnt(worksheets("sheet1").cells(i,2).Value)
strbarcode = worksheets("sheet1").cells(i,3).Value
If intdrawing = 48 and left(strbarcode,2) = "fe" then intcount + 1
i = i + 1
Wend
End Sub