[comp.windows.ms] Excel ON.DATA

tpoind@eatdust.uswest.COM (12/21/90)

I'm having trouble with the ON.DATA() macro, would greatly appreciate 
any pointers/suggestions.  Here's the scenario:

Excel 2.10C
Windows 3.0
Dynacomm/3270 3.0

I have a macro that communicates via DDE to Dyancomm for communications
services.  I fire off DDE EXECUTE() commands, then poll a DDE REQUEST
item in Dynacomm for the status (some commands in Dynacomm can take
several minutes);  when the Dynacomm commands are finished, data is passed back
to Excel either via the clipboard, files, or other REQUEST items.  The problem
is that when Dynacomm is downloading a file, it cannot be interrupted to
answer a REQUEST.  The Excel macro blocks on the REQUEST() until Dynacomm
responds (hourglass cursor, cannot even switch to another windows app.)
I normally check the status in a ON.TIME macro that fires up every few 
seconds.

I'm now re-writing both the Excel macro and Dynacomm script so that 
Dynacomm opens a secondary DDE channel back to the Excel macro sheet and POKEs
data into a cell (R1C1).  My problem is trying to get the ON.DATA() statement 
to wake up another macro command when the R1C1 cell changes.  The POKE from
Dynacomm works just fine, I can see the data change in R1C1.  The manual 
states that ON.DATA() takes two parameters, the first being "remote references"
(one or more) of items to act upon; the second is the macro reference to
call.  I can't seem to code the "remote reference" in such a way as to trigger
the macro.  I've tried the following (all combinations of remote reference
and macro reference, and probably more)

	=ON.DATA("Excel|mymacro.xlm!R1C1","mymacro.xlm!R30C2")
	=ON.DATA("'Excel'|'mymacro.xlm'!R1C1","mymacro.xlm!wakeup")
	=ON.DATA("mymacro.xlm!R1C1","mymacro.xlm!R20C2")

(you get the idea)

So how does one code the remote reference?  In all cases, Excel interprets
the ON.DATA statement without complaining.  The only definition of "remote
references I can find is in the Reference Guide under "Linking documents"
I find no where on how to code multiple remote references (separated by
commas, semi-colons, white space,  who knows?)

I suppose a work around is to have my ON.TIME code check every time the 
cell changes.  Not as pretty, but who would want to look at this macro
anyway ;-)

Any MS'ers feel free to add your comments.  I tried your support number
a few minutes ago, "Closed because of weather" (?) 12/20/90.
	ingridt, are you there?????

Thanks for any help!
Tom
-Tom Poindexter		tpoind@uswest.com   ..!uunet!boulder!uswat!tpoind
I miss IVRS!