DDE 6000 And Excel
How do you send command from Excel 7.0 to our 6000 products using DDE6000?
You must follow these steps:
Open a channel with DDEInitiate
Use the DDEPoke to send a string that is inputted from a cell. The string will be sent to the DDE6000 Server. Note that I have only been able to get input from a Cell. I was told that in the old version of Excel you could hard code your string into the DDEPoke function, but this is no longer the case with Excel 7.0. Maybe because Excel 5.0 was a 16-bit application while excel 7.0 is a 32 application?
Use DDETerminate to close the channel to the DDE6000.
The two following functions were written to show what to do (WorksMoveIt() ) and what not to do (NotWorksMoveIt() ).
Â
Sub WorksMoveIt()
Dim DDEChannel%
DDEChannel = DDEInitiate("DDE6000", "FASTSTATUS824")
Call DDEPoke(DDEChannel, "CMD", Cells(1, 1))
Call DDETerminate(DDEChannel)
End Sub
Sub NotWorkMoveIt()
Dim DDEChannel%
Dim strCmd As String * 20
strCmd = "lh0:go1:"
DDEChannel = DDEInitiate("DDE6000", "FASTSTATUS824")
Call DDEPoke(DDEChannel, "CMD", strCmd)
Call DDETerminate(DDEChannel)
End Sub