Problem with Macro
Is mydata a string?
Maybe try
TotTemp = TotTemp + CDbl(mydata)
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Shashi Bhosale" wrote in message
...
Dim TotTemp As Double
Private Sub PSTimer1_Tick()
Chan = Application.DDEInitiate("WinWedge", "COM2")
mydata = Application.DDERequest(Chan, "FIELD(3)")
TotTemp = TotTemp + mydata
ctr = ctr + 1
End Sub
I am getting "Type Mismatch" error at TotTemp = TotTemp + mydata .
Any ideas ?
|