Quote from anarcho:
Yes, the DDE support document also has an example to use. Here is a simple example, take this code and copy it into a excel visual basic module:
Sub submitOrder()
Dim order As STIOrder
Set order = New STIOrder
order.Account = "enter username here"
order.Side = Range("a2").Value
order.symbol = Range("b2").Value
order.quantity = Range("c2").Value
order.PriceType = ptSTILmt
order.Tif = Range("d2").Value
order.Destination = Range("e2").Value
order.LmtPrice = Range("f2").Value
order.submitOrder
Set order = Nothing
End Sub
Then put the corresponding info the the spreadsheet. In A2 place the side (B,S or T), B2 symbol, C2 quantity, D2 put in D for day order, E2 pick an ECN, F2 you can place the DDE code for the bid/ask of the stock you choose in cell B2.
Then insert a shape onto the spreadsheet and right click it. assign macro you just made in VB. Now all you gotta it click that shape and the order is sent.