Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DDE Initiate does not work

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Initiate a trigger for clearing a list of check boxes? JGarland Excel Worksheet Functions 1 September 18th 08 04:36 PM
How can a macro automatically initiate uponing a file? kanye Excel Discussion (Misc queries) 5 April 27th 05 11:45 PM
Initiate perl script in linux from a Windows VBA program bwreath Excel Programming 0 June 4th 04 05:49 PM
Initiate Macro Formula :: Combo Boxes lykwid Excel Programming 1 January 23rd 04 05:31 PM
Shell Command to initiate Linux program verizon Excel Programming 0 October 21st 03 06:33 AM


All times are GMT +1. The time now is 02:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"