Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DDEExecute commands for Excel

Status
Not open for further replies.

XCV73

Programmer
Aug 14, 2002
4
0
0
GB
This has been probably been asked a thousand times before. Anyone know where I can get the Excel DDEExecute commands from?

I have to use DDE as that is all this particular client can use externally.

--
Kevin
 
Thanks, but I was rather after things like [workbook.select("Sheet2")]. Thanks anyway.
 
Have you found this information yet? I've been trying to find the same thing.

Thanks,
Jim
 
I've been picking up a few where I can (like finding pebbles on a beach). Here are a few of what I have found (offered on an "as is" basis -- I haven't even tried all of them.):


[OPEN("c:\excel\sheet1.xls")]

[NEW(n)]

[COLUMN.WIDTH(4,"C2:C4")]

[FORMULA("1","R1C1")]
[FORMULA("2","R2C1")]
[FORMULA("3","R3C1")]
[FORMULA("4","R4C1")]
[FORMULA("5","R5C1")]

[SELECT("R1C1:R5C1")]

[FORMULA("=ACTIVATE.NEXT()","R1C1")]
[FORMULA("=COPY()","R2C1")]
[FORMULA("=CREATE.OBJECT(5,""R1C3"",0,0,""R5C8"",0,0,2)","R3C1")]
[FORMULA("=CANCEL.COPY()","R4C1")]
[FORMULA("=RETURN()","R5C1")]

[RUN("R1C1")]

[ACTIVATE.PREV()]

[CLOSE("FALSE")]

[COPY("R1C1:R3C10")]

[PASTE()]

[Run("Macro_Name")]

[select("r1c1:r20c3")]
[sort(1,"R1C1",1)]
[save.as("dde3.xls")]
[quit()]
[FILE-OPEN("C:\COURSES\DATA\CLIN.XLS")]
 
Thanks. That helps.

I have figured out a few to do with formatting:

[Alignment(,,4)] align to top
[Alignment(,1)] wrap text
[Alignment(3)] center
[Column.Width(90,"R1C4:R99C4")]
[Format.Font("Courier New",10,False)]
[Page.Setup(,,,,,,,,,,2)] landscape layout
 
I ran across this statement regarding Excel DDE: "The best way to find out what a given command looks like is to go into EXCEL and record a MACRO while selecting the MS EXCEL 4.0 style, then simulate the commands you want to execute. Take a peek at the MACRO afterwards, and voila', you have the correct syntax."

I don't think the latest versions of Excel allow you to create Excel 4.0 style macros, but I searched the Microsoft website for "Excel 4.0 macro" and "reference" and found documentation that can be downloaded. I had to also download Stuffit Expander to extract the files, but then I had a set of Word documents with all the information I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top