Hi folks
I am trying to read out a couple of strings with this Code
I am getting only "74" back into excel...?!?!? But when i look into the CLX there is an complete string an no "74"
any idea where i did the misstake?
I am trying to read out a couple of strings with this Code
Code:
Sub weigher()
rslinx = DDEInitiate("RSLINX", "Mermaid_04")
For i = 0 To 100
'Get the value form the DDE link
weigherdata = DDERequest(rslinx, "Program:ComSock02_TCPClient.History[" & i & "].String_Data.DATA,L1,C1")
'If there is an error, display a message box
If TypeName(Data) = "Error" Then
If MsgBox("Error reading tag ComSock02_TCPClient.History[" & i & "]String_Data.DATA" & _
"Continue with Read?", vbYesNo + vbExclamation, _
"Error") = vbNo Then Exit For
Else
'No error, place data in cell
Cells(2 + i, 1) = weigherdata
End If
Next i
'Terminate the DDE connection
DDETerminate rslinx
End Sub
any idea where i did the misstake?