Excel NG sample spreadsheet issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Robertr
    Junior Member
    • Aug 2014
    • 4

    #1

    Excel NG sample spreadsheet issue

    Hi All,

    I'm using the new spreadsheet and looking to migrate across a bunch of calculations from the older version (that worked fine without any hiccups) but have been having difficulty getting the new spreadsheet operational.

    For example, once I've entered the app and sessions keys I click 'login' and get the 'logged in OK' message.

    Then I click 'select market' and the spreadsheet bites it. The Debugger opens up and I get the following error:

    Compile error
    Variable not defined.


    The code it points to is:

    'Initialize and ensure logged in
    Private Sub UserForm_Initialize() <--(this is highlighted)

    Dim lngFirstSport As Long

    'Attach the images
    Set tvwMarkets.ImageList = ImageList2

    'initialise the tree
    Call Refresh

    End Sub



    So to make matters worse I am no programmer and any help that is aimed at a simple quick fix will make me very happy!

    Thanks all!
  • Robertr
    Junior Member
    • Aug 2014
    • 4

    #2
    After taking a look around the net it appears the ImageList2 variable needs to be defined for the market to compile, I tried typing

    Dim ImageList2 but this hasn't done anything, it's a bit of try anything and see what happens. Anyone familiar with this issue in VBA? I must be the one lucky punter who gets this error!

    Comment

    • davecon
      Junior Member
      • Dec 2010
      • 86

      #3
      Hi Robert
      You would probably be better asking in the Excel Department where you got the code from http://forum.bdp.betfair.com/showthread.php?t=2423
      I am not into "Excel" and vba butIve just took a quick shufty at it and it works fine for me but
      the problem you have is Are you sure you are entering the correct App Key and/Or Session Token?
      (Are you using the Login Button that takes you to the site that gets the session Token for instance - Thats half the battle?)
      BUT There is a problem in the code that shows you are logged in OK on the status bar even when you are Not!
      Try entering 123 as your App Key and 123 as your Session Token
      It will say Logged into Betfair Ok which obviously you are Not
      If I try it with RPC I get a 424 error but with rest it tells me I have entered them wrong
      So that is all that is wrong as far as I can see
      All I can do for you mate so hope it helps a bit otherwise maybe the Betfair Guy can help you
      Again this shows that the Betfair Team take no notice of these Forum problems which other members have also observed
      Dave

      Originally posted by Robertr View Post
      Hi All,

      I'm using the new spreadsheet and looking to migrate across a bunch of calculations from the older version (that worked fine without any hiccups) but have been having difficulty getting the new spreadsheet operational.

      For example, once I've entered the app and sessions keys I click 'login' and get the 'logged in OK' message.

      Then I click 'select market' and the spreadsheet bites it. The Debugger opens up and I get the following error:

      Compile error
      Variable not defined.


      The code it points to is:

      'Initialize and ensure logged in
      Private Sub UserForm_Initialize() <--(this is highlighted)

      Dim lngFirstSport As Long

      'Attach the images
      Set tvwMarkets.ImageList = ImageList2

      'initialise the tree
      Call Refresh

      End Sub



      So to make matters worse I am no programmer and any help that is aimed at a simple quick fix will make me very happy!

      Thanks all!

      Comment

      • Robertr
        Junior Member
        • Aug 2014
        • 4

        #4
        Champ, thanks Dave.

        Just noticed a popup on the first open that says 'could not load some objects because they are not available on this machine'.

        Looks like the objects being referred to need to be found, they are the object of my frustration.

        On the positive:
        You were spot on about the 'logged in OK' not actually being logged in OK.
        After clicking the button the session Key and App Key load in fine/
        Clicking the market causes the compiling error to kick in once more.

        Thanks again, looks like I need to find the missing Object files.

        Comment

        • fastforward
          Junior Member
          • Nov 2010
          • 11

          #5
          I used to get the ImageList2 error on the old spreadsheet. I am not a good programmer but I could not figure it out. Somedays it would happen and somedays it wouldn't
          I ended up loading markets by marketID downloaded via mumbles code in his tutorial.
          If you are going to develop the spreadsheet it may be an idea to go to the vba/excel forum.

          Comment

          Working...
          X