gnaga
03-23-2005, 05:32 AM
Hi,
I used to get data from a third party software through its DDE server using Visual Basic. The same code is given below.
Option Explicit
Option Base 1
Const LINK_NONE = 0
Const LINK_MANUAL = 2
Const SERVICE$ = "SERVER3500"
Const TOPIC$ = "CHANNELDATA"
Const RACKNO$ = "1"
Private Sub Get_Data()
txtDDEContent.LinkMode = LINK_NONE 'THIS IS TO RESET THE LINK
txtDDEContent.LinkTopic = SERVICE & "|" & TOPIC
txtDDEContent.LinkMode = LINK_MANUAL
txtDDEContent.LinkItem = Format$(RACKNO, "00") & "/" & Format$(2, "00") & "/" & Format$(1, "00")
txtDDEContent.LinkRequest
End Sub
Private Sub Delink_Server()
txtDDEContent.LinkMode = LINK_NONE
End Sub
This was done with single PC. I mean the server and my code run on same machine.
Now the server (third party software) is running in one PC which is connected in the LAN (peer to peer). In another PC we run office 97.
I want to collect the same data using excel VBA code. I do not know how to change the code to suit for excel VBA.
Can some one help me for this?
TIA
GNaga:doh:
I used to get data from a third party software through its DDE server using Visual Basic. The same code is given below.
Option Explicit
Option Base 1
Const LINK_NONE = 0
Const LINK_MANUAL = 2
Const SERVICE$ = "SERVER3500"
Const TOPIC$ = "CHANNELDATA"
Const RACKNO$ = "1"
Private Sub Get_Data()
txtDDEContent.LinkMode = LINK_NONE 'THIS IS TO RESET THE LINK
txtDDEContent.LinkTopic = SERVICE & "|" & TOPIC
txtDDEContent.LinkMode = LINK_MANUAL
txtDDEContent.LinkItem = Format$(RACKNO, "00") & "/" & Format$(2, "00") & "/" & Format$(1, "00")
txtDDEContent.LinkRequest
End Sub
Private Sub Delink_Server()
txtDDEContent.LinkMode = LINK_NONE
End Sub
This was done with single PC. I mean the server and my code run on same machine.
Now the server (third party software) is running in one PC which is connected in the LAN (peer to peer). In another PC we run office 97.
I want to collect the same data using excel VBA code. I do not know how to change the code to suit for excel VBA.
Can some one help me for this?
TIA
GNaga:doh: