- Tracy Lamb
- PowerBuilder
- Saturday, 28 October 2023 04:36 PM UTC
Hi all,
My application registers with Windows as a DDE Server, and communicates with several different 3rd party apps through DDE. We're just now exploring how to communicate via Excel by the same means.
In Excel, I put a button on the worksheet to request information from my app. This works fine. Excel requests the current row number, and the correct response is received by Excel. I can also request the row count, and the correct response is received by Excel.
I put another button on the worksheet to wrte information to my app. This doesn't work. In fact, the remotesend event in my app isn't even triggered. (I put MessageBox's in the remotesend, remoterequest and remoteexec event for testing purposed.) The code I'm using is Excel is :
Sub Button5_Click()
Dim channelNumber As Long
Dim dataToSend As String
Dim dataSendTo As String
dataSendTo = "3~tAsFound"
dataDataToSend = "Poke"
channelNumber = Application.DDEInitiate(app:="CMI Datasheet", topic:="1000453600")
Application.DDEPoke channelNumber, dataSendTo, dataDataToSend
Application.DDETerminate channelNumber
End Sub
I tried enclosing the DDEPoke command with (...) For some reason, Excel doesn't like it! The documentation I found on DDEPoke doesn't have () either.
I'm just wondering why remotesend event doesn't even get triggered. Any thoughts, advice would be appreciated.
~~~Tracy
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.