View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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 ?