Back

Topic

[KB66]DDE Connection between Excel 97 and PcVue

Tags: DDE, DDE Server

14 years ago
By RM
Options
Print
Applies to:

PcVue all versions. Microsoft Excel 97. 


Summary:

This article explains how to write a PcVue variable from Excel.


Details:

Write a VBA macro as shown below, in Excel. It uses the DDE Server of PcVue.

It forces the variable test in PcVue with the value of the cell A1 in Excel.

Sub Macro1()
‘ Macro1 Macro
Do
canalnumber = Application.DDEInitiate(app:=”PCVUE”, topic:=”db”)
Loop Until TypeName(canalnumber) <> “Error”

Set value = Range(“A1”)
Application.DDEPoke canalnumber, “test”, value
Application.DDETerminate canalnumber

End Sub

In the line that starts with canalnumber = :

DDE_connection

Note

The variable test can be a bit, register, or text variable. When you force a variable with Excel, the variable in Excel must have the same type as the PcVue variable test that you want to force.


Created on: 15 Oct 2010 Last update: 13 May 2024