IB TwsActiveX Compile Error

Discussion in 'Programming' started by extraMileage, Dec 12, 2012.

  1. Setting up a new TwsActiveX sheet for IB account.

    The API connects just fine and Account Info is also downloaded with no issues on the Account and Portfolio sheets.

    However, when I "Request Market Data" (CTRL-SHIFT-R) on the Ticker sheet, I get a compile error: "Argument Not Optional"

    The line of code highlighted in the debugger is:

    Call Util.ParseComboLegsIntoStruct(Cells(id, Columns(COLUMN_COMBOLEGS).column).value, objTWSControl.m_contractInfo.ComboLegs)

    Anybody experience this? Have a fix?

    I have not tweaked or edited the file or code in any way.

  2. It appears that this object is nothing:


    So the contract information is not resolved for some reason.
  3. extraMileage, did you ever get this resolved? I am having the same exact issue/error message in the same line of code. Part of the reason to use a ready-made spreadsheet is to avoid dealing with the VBA code.
  4. I was unfortunately unable to find a fix and gave up.

    Dynamic intra-day pricing is not crucial to my needs, although it's frustrating that it's not working.

    Please do share if you find a solution...