Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Macro
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 ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem with Macro
See what value mydata has. It probably is not a double, possibly an error
or a string. -- Jim Rech Excel MVP "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 ? | | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro problem help please. | New Users to Excel | |||
Problem with macro | New Users to Excel | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro problem | Excel Programming |