+ Reply to Thread
Results 1 to 9 of 9

Strange Add-In Problem (Hard to Duplicate)

Hybrid View

  1. #1
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Strange Add-In Problem (Hard to Duplicate)

    I have a very strange problem and I can't seem to diagnose it because it's hard to duplicate/replicate.

    I have an Excel 2003 spreadsheet with VBA code that performs various functions including calling an Add-In that pulls data from servers. The spreadsheet has been working for a long time and the VBA code has not been touched. Lately, everytime I run the code, it first calls the Add-in and as it begins processing, I get "Application-defined or object defined error". I keep pressing OKAY and the problem goes away and continues operating.

    I can't seem to figure out why the problem is occuring. I tried repairing my Excel and even asked IT to delete temp files. This behavior is erratic and I don't think it has anything to do with my VBA code, except one line of code that calls the Add-in which I have no control over since it is from a different vendor.

    I've searched the Internet far and wide and most issues has to with poorly written VBA code but I don't think its my VBA code that's causing the issue. I think it's the Add-in but I'm not sure because it always produces this error when it attempts to call the Add-In. However, sometimes I never get this error so I'm really confused.

    Any help is appreciated?

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Strange Add-In Problem (Hard to Duplicate)

    Can you post the line of code the error occurs on?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Strange Add-In Problem (Hard to Duplicate)

    I can guess where the error is occuring. See the arrow below

    VENDORaddin.GetLicenseStatus "EMAIL", "PASSWORD", freeLicCount, usedLicCount, diagnostic

    If (freeLicCount < 1 Or diagnostic <> "") Then
    MsgBox "Not enough license"
    Exit Sub
    End If

    Vendoraddin.Login "EMAIL ", "PASSWORD", errcode, diagnostic, 1

    If errcode <> 0 Then
    MsgBox "Error loggin in"
    Exit Sub
    End If

    VENDORaddin.ClearCache
    VENDORaddin.calcactivesheet <-----Error occurs here

  4. #4
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Strange Add-In Problem (Hard to Duplicate)

    Bump..anyone? LOL

  5. #5
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,399

    Re: Strange Add-In Problem (Hard to Duplicate)

    That statement appears to be calling a procedure in Vendoraddin. We would almost certainly need to see the code for that procedure to try to understand what that procedure is doing.

    Unless, as with the Login procedure, the programmer passes back some kind of error code that could be used to determine what error is occuring with calcactivesheet. You would have to check the documentation that came with vendoraddin to see if there is any discussion of error codes and what they mean (if that procedure even uses them).

    I don't know if we can help much without knowing what vendoraddin.calcactivesheet is trying to do.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  6. #6
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Strange Add-In Problem (Hard to Duplicate)

    So I'm still having the same issue. It's really hard to figure out what's going on when the Add IN is called and I dont think I can access the code. Does anyone think that it may be something to do with my Excel spreadsheets? Anything I can do to possibly clear temp files, registries, etc... or to check my settings?

  7. #7
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Strange Add-In Problem (Hard to Duplicate)

    Okay so I debugged it further and have determined the following :

    1) When I copy and paste the problematic sheet to a new workbook and run it, the problem disappears. The error goes away
    2) The problem continues to occur in the workbook that I've been using which contains other sheets.

    Is there something going on when I copy over to a new workbook?

  8. #8
    Valued Forum Contributor
    Join Date
    08-29-2012
    Location
    In lockdown
    MS-Off Ver
    Excel 2010 (2003 to 2016 but 2010 for choice)
    Posts
    1,766

    Re: Strange Add-In Problem (Hard to Duplicate)

    Quote Originally Posted by blackscholes View Post
    Is there something going on when I copy over to a new workbook?
    My guess: There is something in the original WB that is conflicting with the sheet. Copying the sheet to a new WB removes this conflict causing it to run as expected.
    *******************************************************

    HELP WANTED! (Links to Forum threads)
    Trying to create reusable code for Custom Events at Workbook (not Application) level

    *******************************************************

  9. #9
    Registered User
    Join Date
    05-21-2014
    Posts
    22

    Re: Strange Add-In Problem (Hard to Duplicate)

    I am getting closer!!!!!

    I noticed that the Excel spreadsheet status bar shows Calculating 0% and runs up to 100% then Ready and then repeats. The weird thing is that, it's not really calculating anything. This is possibly related to an WorkSheet_Changed event that keeps getting called and I'm not sure why. But what's happening is when the ADD-IN is called and performs various calculations, this Worksheet_Changed event is also triggered which may conflict.

    I disabled the event before the ADD-IN is called and re-enabled it after and the problem disappeared.

    Does this make sense?

+ 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. recovery of my original numbers (hard problem please help me)
    By saman_salehi1 in forum Excel General
    Replies: 3
    Last Post: 04-12-2013, 02:21 AM
  2. [hard to explain problem in few words]
    By aka85 in forum Excel General
    Replies: 5
    Last Post: 08-30-2007, 05:58 AM
  3. Am I being Ignored, or is my problem too hard?
    By sharpie23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-27-2005, 10:05 PM
  4. Another HARD VLOOKUP Problem, can it be done ?
    By Roby in forum Excel General
    Replies: 4
    Last Post: 07-29-2005, 06:05 PM
  5. Begineer with (seemingly) hard problem
    By mrayner in forum Excel General
    Replies: 7
    Last Post: 06-28-2005, 04:05 AM

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