excel TWS DDE beginner sheet problem

Discussion in 'Retail Brokers' started by TraDaToR, Jan 5, 2008.

  1. TraDaToR



    I've a problem with IB's excel example sheet that I can't resolve for some time and I'm watching for some help. Please don't flame me, I'm new to VBA...

    For those using this file, there's a "ticker" sheet were you get your bid and ask quotes for several symbols. When the API is connected, those numbers are shown with a ". "decimal separator.

    I can't use those prices. I can display them on a msgbox but only as string. They are not numbers in fact and I can't do anything with it. I tried to replace ". " by "," with find/replace but excel don't find any".". I've been to excel options to change decimal separator. I've tried to use IB's example 2 module( which is supposed to use those datas in calculation ) but when I use a msgbox for askprice, no msgbox is showing...

    Sorry for the newbie question but I'm stuck with this. How do you convert string "15.74" to double" 15.74"?

    Thanks a lot. Hope someone had the same problem before.
  2. Clym


    Dim price2 as double
    price2 = (that string variable's name)

  3. TraDaToR


    In fact, I had to use val() function to convert.

    Thanks a lot.