F
Ferenc Nagy
Hi!
This is an Excel Macro.
I want to pass data from Excel to another program,
running in a command window.
Sub Macro2()
Dim channelNumber As Long
Application.DisplayAlerts = False
channelNumber = Application.DDEInitiate("PE2", "new.txt")
Set rangeToPoke = Worksheets("Sheet1").Range("A1:C2")
Application.DDEExecute channelNumber, "e x"
Application.DDEExecute channelNumber, "[cursor data]"
Application.DDEPoke channelNumber, "[cursor data]",
rangeToPoke
Application.DDEExecute channelNumber, "[mark line]"
returnList = Application.DDERequest(channelNumber,
"Topics")
For i = LBound(returnList) To UBound(returnList)
Worksheets("Sheet1").Cells(i, 1).Formula =
returnList(i)
Next i
Application.DDETerminate channelNumber
End Sub
The Pe2 program has started but
why have I got Run time error 13 "type mismatch" at this
line:
channelNumber = Application.DDEInitiate("PE2", "new.txt
What can I do instead of DDE calls?
Regards
Ferenc Nagy
This is an Excel Macro.
I want to pass data from Excel to another program,
running in a command window.
Sub Macro2()
Dim channelNumber As Long
Application.DisplayAlerts = False
channelNumber = Application.DDEInitiate("PE2", "new.txt")
Set rangeToPoke = Worksheets("Sheet1").Range("A1:C2")
Application.DDEExecute channelNumber, "e x"
Application.DDEExecute channelNumber, "[cursor data]"
Application.DDEPoke channelNumber, "[cursor data]",
rangeToPoke
Application.DDEExecute channelNumber, "[mark line]"
returnList = Application.DDERequest(channelNumber,
"Topics")
For i = LBound(returnList) To UBound(returnList)
Worksheets("Sheet1").Cells(i, 1).Formula =
returnList(i)
Next i
Application.DDETerminate channelNumber
End Sub
The Pe2 program has started but
why have I got Run time error 13 "type mismatch" at this
line:
channelNumber = Application.DDEInitiate("PE2", "new.txt
What can I do instead of DDE calls?
Regards
Ferenc Nagy