+ Reply to Thread
Results 1 to 4 of 4

Need help debugging an Add-In that sometimes works and sometimes doesn't

  1. #1
    Registered User
    Join Date
    04-09-2014
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need help debugging an Add-In that sometimes works and sometimes doesn't

    Hi all,

    I'd be very much obliged for any help anyone can provide in solving this issue: I have an add-In that I'm using in Excel 2010 which reformats the data in a spreadsheet. The raw data is exported from a trading platform into Excel. The trading platform is periodically upgraded/updated by the vendor and it seems like every time they do so, they change how the raw data is formatted. So, every time I upgrade the trading platform, I also have to tweak the add-in. On this last go-around however, things didn't go 100% and now sometimes the add-in works well and sometimes it doesn't. When it doesn't work, Excel seems to get stuck/frozen in some kind of loop. I then have to break the loop/close Excel. Upon doing so, I get a brief popup error message ("Runtime error -2147417848 Method 'cells' of object_'Worksheet' failed") and then Excel crashes.

    I can't figure out why this is happening, and furthermore what baffles me is why the macro works fine on some data but then craps out on other data sets, even though the data is always formatted exactly the same way when it gets exported from the trading software into Excel.

    I've attached an example of a spreadsheet that causes the problem, and I've also attached an example of a spreadsheet that works just fine.

    Unfortunately it looks like I can't attach the .xla add-in file to this post (and can't use WinZip on this computer either, so can't Zip and attach it), and the actual code exceeds the character limit for a post, so I'd have to email the .xla to anyone who might be interested in helping.

    thanks,
    Phil
    Attached Files Attached Files
    Last edited by damjanovic; 04-09-2014 at 09:21 PM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Need help debugging an Add-In that sometimes works and sometimes doesn't

    The only difference I can see is that in the file that works the column "Orders_ExchangeConfirmation" contains numbers in a form that excel would interpret this as a string but in the file that don't work this column contains a "real" number (with scientific notation) but if this is the cause of your problem is difficult to tell without the xla add-in.

    You could try to rename the ".xla" to ".xls" and then test if it's possible to upload. If so you must add a comment so that forum members know they have to rename it back to ".xla" in order to test.

    Alf

  3. #3
    Registered User
    Join Date
    04-09-2014
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need help debugging an Add-In that sometimes works and sometimes doesn't

    Quote Originally Posted by Alf View Post

    You could try to rename the ".xla" to ".xls" and then test if it's possible to upload. If so you must add a comment so that forum members know they have to rename it back to ".xla" in order to test.

    Alf
    Hi Alf,

    I renamed the add-in to .xls and attached it. It's called CQG Blotter Converter v148804. Don't forget to rename to .xla after downloading. Thanks.
    Attached Files Attached Files
    Last edited by damjanovic; 04-10-2014 at 05:21 PM. Reason: clarification

  4. #4
    Registered User
    Join Date
    04-09-2014
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need help debugging an Add-In that sometimes works and sometimes doesn't

    Bump and/or update... I tried stepping through the xla file one line at a time and also running the add-in on a couple of other spreadsheets and I've managed to isolate where the issue is happening, although I still don't understand why.

    It looks like the add-in gets stuck in an endless loop any time column E in the spreadsheet has any value of the format F.US.RBExxx or F.US.HOExxx. I don't know what it is about these two values that causes this effect. The only thing different about the RBE and HOE type values is that in column O the price format is different (four demical places instead of the normal two).

    The place in the add-in where the endless looping happens seems to be this part:

    Please Login or Register  to view this content.
    and specifically this part:

    Please Login or Register  to view this content.
    Still struggling to figure it out...any ideas anyone?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My VBA Macro Sometimes Works and Sometimes Doesn't
    By chsaav in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-22-2013, 09:10 PM
  2. Code that sometimes works and sometimes doesn't
    By kat14 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2013, 05:20 PM
  3. ListBox works, then doesn't
    By Bagharmin in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2011, 12:18 PM
  4. [SOLVED] Sub works sometimes and sometimes doesn't
    By Barry O''Connell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2006, 10:10 PM
  5. it works, it doesn work, its works....and so on.
    By Naz in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-30-2005, 09:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1