mulderm
Member
Hello,
In Excel I have place in cel A1 a topic: =RSLINX|'Testsol'!'N7:0'
This works excellent, a change in N7:0 in PLC/5 change also
in cel A1.
Then I wrote the follow code in de VBA Module1:
sub Auto()
worksheets("DDE").Ondata="Start"
end sub
sub Start()
channelnum=DDEInitiate("RSLINX", "Testsol")
data1=DDERequest(channelnum, "N40:0")
DDETerminate channelnum
range("D1").value=data1
end sub
When the value in cel A1 change, nothings happens.
It looks that the Ondata event not working.
I want to use a triggerbit to run my macro.
What do I wrong?
Greetings,
mulderm
In Excel I have place in cel A1 a topic: =RSLINX|'Testsol'!'N7:0'
This works excellent, a change in N7:0 in PLC/5 change also
in cel A1.
Then I wrote the follow code in de VBA Module1:
sub Auto()
worksheets("DDE").Ondata="Start"
end sub
sub Start()
channelnum=DDEInitiate("RSLINX", "Testsol")
data1=DDERequest(channelnum, "N40:0")
DDETerminate channelnum
range("D1").value=data1
end sub
When the value in cel A1 change, nothings happens.
It looks that the Ondata event not working.
I want to use a triggerbit to run my macro.
What do I wrong?
Greetings,
mulderm
Last edited: