Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LMR51450-CALC: Calculation tool keeps crashing with runtime error '1004'

Part Number: LMR51450-CALC
Other Parts Discussed in Thread: LMR51450, LMR51440, LMR51410

Tool/software:

Hi, I'm adjusting the response of a LMR51450, but the calculation tool provided for this part keeps crashing on Excel with runtime error '1004', on WorksheetFunction.ImDiv function.

Debugging the code, there is a complex divide function DI(jw1, jw2). Evaluating the parameters, jw1 = "19" and jw2 = "0,0000047"

I don't know if that's the case, but my system is in Portuguese (PT-BR) and excel uses comma as decimal separation as standard. I changed that on Excel configurations, but the value passed to the DI function still has a comma as a decimal separator.

Calculation tools for other parts are working normally on my system, even with original decimal separator configuration.

Is this maybe a commom and easily solvable problem, because I didn`t find other questions about this.

This problem seems to apply for LMR51450, LMR51440 and LMR51410.

  • Hi,

    Can you please provide what version of excel you are using?

    Additionally, did you ensure to enable macros when starting the excel file? The calculator has a set of instructions on it's first sheet to show how to do this.

    Thank you,

    Joshua Austria

  • Hi, thanks for the response!

    Yes, I did go through the steps to enable macros and ActiveX on the 'Instructions' sheet. Although configuration menus changed a bit on the newer versions of Excel, they remain valid.

    And I know macros are enabled because I could run another calculation tool (LM63460-LM64460-Q1 Quickstart Tool - revA) that, apparently, also depends on them.

    My excel version as copied from the 'about' screen:

    Microsoft® Excel® para Microsoft 365 MSO (versão 2407 Build 16. 0. 17830. 20056) 64-bit

  • Hi Kimon,

    Thank you for trying that. I will try and get in touch with the engineer who created this tool and get back to you by the end of the week.

    Thank you,

    Joshua Austria

  • Hi Joshua

    I THINK I got this working. The problem seems to be with excel returning commas as decimal even though it is configured with dots.

    I had to change the modules though... I added some code to replace commas with dots and it seems to be working. I think there is a much more elegant form of solving this, but this will do for now

    It would be nice to get a proper solution from TI, though, as I'm not really proficient in VBA and very prone to errors =))

    I can send you the file through email if it is helpful.

  • Hi Kimon,

    Sounds good! I will still follow up with the other engineer and see if there is anything else to add by the end of the week, but happy to hear that you got it working!

    Thank you,

    Joshua Austria

  • Hi Kimon,

    I reached out internally to the team, and they would like more information as to your issue. If you would like more assistance on this, please send the problem file and some captures of your debug. 

    In any case, I will be closing this thread. If you would still like more assistance with this, please feel free to open the thread back up.

    Thank you,

    Joshua Austria