The format for a Microsoft Excel 97/2000 procedure that performs a setpoint is:
Enter the Sub procedure name on the first line.
Enter channel= Application.DDEInitiate("cwserv","point") on the second line to open the CWSERV channel.
Enter Application.DDEPoke channel, "<point_id>.<attribute>", <sheet location> for each setpoint you want to perform.
Enter Application.DDETerminate channel to close the channel.
Enter End Sub to terminate the Sub procedure.
Macro Example
Sub Poke()
channel = Application.DDEInitiate( app:="cwserv", topic:="point")
Set rangeToPoke = Worksheets("Sheet1").Range("A1")
Application.DDEPoke channel, "POINT1.value", rangeToPoke
Application.DDETerminate channel
End Sub
3. Modify point data. |