First of all thanks for the response, here is the
code in Excel
?
Sub cancelOrder()
???
clearError
???
??? ' get existing
id
??? Dim existingId As Long
??? existingId
= Cells(ActiveCell.row, 13).value
?
??? ' cancel
order
??? Sheet5.Tws1.cancelOrder (existingId)
End
Sub
?
Maybe I did not make it clear but I am trying to
come up with a stand alone program, that being said in the code above there
is references to sheets and cells which don't exist
in my prog. I am not sure what to put in there place.
?
Thanks,
?
Bruce
toggle quoted message
Show quoted text
----- Original Message -----
Sent: Thursday, July 04, 2002 6:21
AM
Subject: twsapi: Re: Help! Cancel
order
Open the workbook, and press Alt-F11. Visual Basic for
Applications
should appear. All the code for cancelling an order is on
sheet2
(Orders).
What part of the code do you have a problem with,
exactly?
MK
--- In twsapi@y..., "Bruce
Hawkins" <hawkinsk001@h...>
wrote:
> Thanks for the response, and if I was a little more savy
regarding
VB what you sent would be helpful.
>
> I have
looked at user's guide and Excel code trying to come up with
what I need
and I can't figure it out.
>
> But thanks anyway.
>
> Bruce
>?? ----- Original Message -----
>?? From: mk_trading_911
>?? To: twsapi@y...
>?? Sent: Thursday, July 04, 2002 6:04 AM
>??
Subject: twsapi: Re: Help! Cancel order
>
>
>??
Either: store in your application's globals the ID number of the
>?? orders you are sending, and their status, or extract them
from
TWS
>?? (Tws1.reqOpenOrders). Once you know the ID,
then use:
>?? Tws1.cancelOrder (orderId). It's all in the
Excel spreadsheet VBA
>?? Macros, and user's
manual.
>?? I hope this helps.
>
>??
MK
>
>
>?? --- In twsapi@y..., "Bruce Hawkins"
wrote:
>?? >? I have been
struggling with this for 2 days, does anyone have
VB
>??
code for canceling a pending order. I 've tried 6
>?? >
ways from Sunday to make it work and I am totally lost.
>??
>
>?? > Thanks,
>?? >
>?? > Bruce
>
>
>???????? Yahoo! Groups Sponsor
>??????????????
ADVERTISEMENT
>?????????????
>???????
>
>?? To unsubscribe from this group, send an email
to:
>?? twsapi-unsubscribe@y...
>
>
>
>?? Your use of Yahoo! Groups is subject to the Yahoo! Terms
of
Service.
To
unsubscribe from this group, send an email
to:
twsapi-unsubscribe@...
Your use of
Yahoo! Groups is subject to the .