Excel DDE macro: write a word

The following macro writes a value to
N7:0
in a PLC-5 using the RSLinx Classic topic,
testsol
: This routine will write a word from Excel file
RSLINXXL.XLS
, DDE_Sheet tab, cell D7:
Sub Word_Write()
'open dde link: testsol=DDE Topic
RSIchan = DDEInitiate("RSLinx", "testsol")
'write data thru channel
DDEPoke RSIchan, "N7:30", Range("[RSLINXXL.XLS]DDE_Sheet!D7")
'close dde channel
DDETerminate (RSIchan)
End Sub
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal