Sends a command to a DDE server application.
[ lStatus = ] DdeExecute ( hConv, sCmd )
The DdeExecute procedure syntax has the following parts:
|
Name |
Type |
Description |
|
lStatus |
Long |
Status |
|
hConv |
Val AHandle |
OLE_Handle of the DDE conversation |
|
sCmd |
Val BString |
Commands |
Returns TRUE for success and FALSE for failure. This function is used to send a command or series of commands to the server. The hConv can be retrieved by calling the DdeInitiate function. The Timeout for the server response can also be set by calling the DdeTimeout function.
sCmd="[ACTIVATE(\"SHEET1\")]"
sCmd=sCmd+"[SELECT(\"R1C1:R5C2\")]"
If DdeExecute(hConv, sCMD) = FALSE Then
Abort
Endif
! Now the first 2 cells in the first 5 rows are selected in Excel