dazed and confused
Member
Ok I have figured out how to unpack a 16 bit word in excel from a DDE server. Also figured out how to get the word in excel cell formula (=ovs|slow!"tagname") Ovs being the server name, slow is the 1 second update rate (fast updates 300ms). The issue is I have about 300 tags I want to put in the spread sheet for trouble shooting purposes. I do not want to possibly crash the network by having all 300 tags update continiously. I was able to record a macro that sets the location to 0 when not in use and also set the location to the above format. However I will have to do that for every tag/word I use and that would be 300 seperate macro's. In the formula bar I can enter "=ovs|slow!"&"tag name" and it will string the complete address to a cell but that is not the same as putting in a formula even though it looks the same. Tried several variations in VB but nothing seems to work. Has anybody done this before?
This code has worked for others but the application was used in conjunction with DataHub :
GetInput Macro
sub GetInput()
mychannel=DDEInitiate("datahub","default")
NewVal=DDERequest(mychannel,"my_pointname")
sheet1.cells(2,3)=NewVal
my_pointname is a selection from the DataHub.
I tried:
sub GetInput()
location=DDEInitiate(server,network)'ovs|slow'
dim tagName as string (tried as Double, Long, Object ect.)
tagName=(used one of my tag names)
NewVal=DDERequest(location,TagName)
sheet1.cells(2,22)=NewVal
This code has worked for others but the application was used in conjunction with DataHub :
GetInput Macro
sub GetInput()
mychannel=DDEInitiate("datahub","default")
NewVal=DDERequest(mychannel,"my_pointname")
sheet1.cells(2,3)=NewVal
my_pointname is a selection from the DataHub.
I tried:
sub GetInput()
location=DDEInitiate(server,network)'ovs|slow'
dim tagName as string (tried as Double, Long, Object ect.)
tagName=(used one of my tag names)
NewVal=DDERequest(location,TagName)
sheet1.cells(2,22)=NewVal