请大神帮忙,想把二维码读取设备上把读到的字符段导入EXCEL
想把二维码读取设备(OMRON V530-R160)D-SUB连接并上把读到的字符段导入EXCEL。请大神指点。现在有几个问题点:1:设备上读取数据到电脑上,2:如何把读到的多条信息记录下来,3:如何将信息导入到EXCEL表。
说明书上给的从设备上读出CODE的程序段:
100 Close #1
110 Open "com:e73nn" For Random As #1
120 Print #1, "@GL" + Chr(&H0D)
130 Input #1, RESDATA$
140 Print "READ DAT=" RESDATA$
150 GOTO 120
160 End Sub
导入EXECL
Private Sub Command1_Click()
If Dir("D:\temp\excel.bz") = "" Then
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlBook = xlApp.Workbooks.Open("D:\temp\bb.xls")
Set xlSheet = xlBook.Worksheets(1)
xlSheet.Activate
xlSheet.Cells(1, 1) = "abc"
End If
End Sub