Date: Wed, 19 Sep 2001 14:40:25 -0700
Reply-To: Roger Abbott <rogerha@AOL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Roger Abbott <rogerha@AOL.COM>
Subject: Re: Excel commands to write to filename cmds dde "excel|system"
Content-Type: text/plain; charset=ISO-8859-1
Frank.Poppe@PWcons.com (Frank Poppe) wrote in message news:<email@example.com>...
> Hi all,
> I am trying to write some commands from SAS to Excel but are unable to
> find the command syntax. When I record a macro in Excel I am able to
> translate more or less the syntax into OLE method calls.
> But writing to the excel|system destination seems to require a
> different syntax. For e.g., fitting the width of a column to the
> selection comes up in the VBA window as
> But I know from some example that the syntax for DDE is:
> filename cmds dde "excel|system" lrecl=512;
> data _null_;
> file cmds;
> put "[column.width(,,,3)]";
> RUN ;
> Can anybody point me in the right direction? Either the place where
> this syntax is documented, or some method make the translation from
> the VBA windows?
You send Excel macros by DDE, not VBA object model commands. The file
you need is macrofun.exe (Excel 95) or macro97.exe (Excel 97), both
available for download from the MS web site. To use object model
commands you must record them in a macro and run the macro with DDE.
The DDE FAQ page on the web site has links and info about controlling
Excel with DDE.
RHA (Minisystems) Ltd.
DDE ActiveX controls and FAQ
Other Freeware and Shareware