Thanks Glenn,
Finding the correct command and format is key as you say. Looks like I'm
out of the world of Swiftforth and into that of EXCEL.
Brad McClarren
----- Original Message -----
From: "Glenn Dixon" <DIXONG_at_iomega.com>
To: <sftalk_at_forth.com>
Sent: Tuesday, December 05, 2000 11:33 AM
Subject: Re: [sftalk] XTYP_EXECUTE, DdeClientTransaction, and EXCEL
Brad,
Your command selects the desired cell, but does not perform a command on it.
All DDE transactions to Excel must start with a command. Your example uses
the command WORKSHEETS, and selects the
specified worksheet and cell. That's all this particluar command does.
Though I'm not sure, the Font,ColorIndex=3 is probably ignored.
The reason your string appears in the selected cell is because a string sent
without a valid commandword preceding it
is interpreted as string intput by Excel.
I do not know the command to change the font color index, but I can help
with the command to change a cell's value
It is:
[FORMULA(2.00000E6,"R001C001")]
That is, the commandword FORMULA, and then parameters in parenthesis. This
will put the number 2.0E6 in the cell at row 1 column 1. Note that columns
are numbers and not letters in DDE.
A real formula with math operations, variables and cell values or ranges in
it will also work.
The second parameter (row and column) can be omitted if previous commands
have all ready selected the desired cell.
All DDE commands must start with a commandword. The trick is finding the
right one, and the correct format for the parameters that follow.
Hope this helps,
Glenn Dixon
>>> bmcclarr_at_comanche.redstone.army.mil 12/05/00 05:40AM >>>
Mike and Charles,
Thank you very much for your replies. I tried both suggestions. In each
case, the command I wish to execute within EXCEL is written into the cell as
text. This means I'm getting there, but with the wrong action --- an
improvement. You got me onto the right track!
Brad McClarren
From: "Mike Ghan" <mikeg_at_logix-controls.com>
To: <sftalk_at_forth.com>
Sent: Monday, December 04, 2000 4:15 PM
Subject: [sftalk] XTYP_EXECUTE, DdeClientTransaction, and EXCEL
> I believe VBA (Visual Basic for Apps) prefers caps for the range. Try
>
> Z\" WORKSHEETS(\"SHEET1\").Range(\"A1:C1\").Font.ColorIndex=3"
>
> I've not tested this, but our VBA guy believes this will take care of
> it.
>
> Hope it helps,
>
> Mike
----- Original Message -----
From: "Charles Melice" <mail_at_forthcad.com>
To: <sftalk_at_forth.com>
Sent: Monday, December 04, 2000 5:13 PM
Subject: Re: [sftalk] XTYP_EXECUTE, DdeClientTransaction, and EXCEL
> On Mon, 04 December 2000, "Brad McClarren" wrote:
>
> [...]
>
> > : DDE-EXECUTE ( addr n -- )
> > ( a n) CONV HITEM CF_TEXT XTYP_EXECUTE 5000 0 DdeClientTransaction
> > DdeFreeDataHandle DROP ;
>
> [...]
>
> > Anybody have a pointer or two?
>
> Try the following: ( just "1+" appended )
>
> : DDE-EXECUTE ( addr n -- )
> ( a n) 1+ CONV HITEM CF_TEXT XTYP_EXECUTE 5000 0 DdeClientTransaction
> DdeFreeDataHandle DROP ;
>
> Regards,
> Charles Melice
>
>
>
> _______________________________________________
> Sftalk mailing list Sftalk_at_forth.com
> Visit Sftalk on the web at http://www.forthinc.com/mailman/listinfo/sftalk
_______________________________________________
Sftalk mailing list Sftalk_at_forth.com
Visit Sftalk on the web at http://www.forthinc.com/mailman/listinfo/sftalk
_______________________________________________
Sftalk mailing list Sftalk_at_forth.com
Visit Sftalk on the web at http://www.forthinc.com/mailman/listinfo/sftalk
Received on Wed Dec 06 2000 - 09:36:45 PST
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.