|
-
Jun 8th, 2007, 12:50 PM
#1
Thread Starter
New Member
Live data from Comm1 via VB to Excel
Hello
First of all I’m a beginner in visual basic. I have to find a solution for my problem and I’m hoping some of you will help me.
I try to read data from external device.
‘Private Sub Command_Click()
‘
‘’time = Now()
Debug.Print time + delay
Do While Now() < time + delay
Do
DoEvents
buffer = buffer & MSComm1.Input
Loop Until InStr(buffer, vbCrLf)
Text2.Text = buffer
plot = CDbl(buffer)
buffer = ""
Loop
“””
‘
‘
‘’
‘
####Code Excel####
oSheet.cells(i, 2) = plot
####code######
End
The Problem is I just get a last value when the time is over. What I want is to refresh (plot Variable) in Excel with every input change.
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|