1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| Sub exchange()
Dim L_G As String, G_L As String
Dim a1 As String, a2 As String, a3 As String, a4 As String, a5 As String, a6 As String, a7 As String, a8 As String, a9 As String, a10 As String
[...]
Dim temp As Range
'Set temp = Nothing
Set temp = Range("A1:A8")
L_G = "SIM_L_G"
G_L = "SIM_G_L"
[...]
a8 = ".ECHA02.RQID[0]" 'x8
[...]
'lecture dans la ct
channelNumber = Application.DDEInitiate(app:="RsLinx", topic:="CLX1")
[...]
paqueta8 = Application.DDERequest(channelNumber, L_G & a8 & ",L8,C1")
temp = paqueta8
[...]
'Fermeture du canal
Application.DDETerminate channelNumber
'ecriture puis lecture dans la cg
channelNumber = Application.DDEInitiate(app:="RsLinx", topic:="CLX2")
Application.DDEPoke channelNumber, L_G & a8 & ",L8", temp
'Fermeture du canal
Application.DDETerminate channelNumber
End Sub |
Partager