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