+ Reply to Thread
Results 1 to 13 of 13

Macro with Solver. An unexpected internal error occurred, or available memory

  1. #1
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Macro with Solver. An unexpected internal error occurred, or available memory

    I get the following error when I run a macro with a solver function:
    An unexpected internal error occurred, or available memory.
    I've already activated the solver in tool >references, so I don't understand what is stoping the macro.
    This is the code I get:
    Please Login or Register  to view this content.
    I don't understand nothing to do with VBA codes, so I would apreciate if you'll be specific in your answers.
    Last edited by sofiaventura; 05-26-2013 at 04:47 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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    What happens when you run solver manually. Do you get the same error message?

    Alf

  3. #3
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    No, it works just fine.
    But I need the macro to perform solver for many cells, so I thought about recording a macro to help me.

  4. #4
    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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Looking at your code I can't see any target cell nor is there a loop command in it so I would suggest you upload the file + a short description of what you wish for solver to do. This would make it easier trying to help you.

    Alf

  5. #5
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    I don't have target cells. My "goal" is to solve to equations (a system), equal them to zero by changing the value of to other cells, my variables that are part of my restrictions.
    In the attached file you can see an example of what I'm trying to accomplish.
    The yellow cells contain my equations, and the red cells are my variables.
    I think I record the macro properly, if don't please let me know.
    example.xlsm

  6. #6
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    *solve two equations...
    * changing the value of two other...

  7. #7
    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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Some good and some bad.

    The bad: I get the same error as you when I try to run a macro in both excel 2003 and excel 2007 and I must say I have no idea why this error occures. I can't find any problem with your macro.

    The good: Testing this macro with Excel2010 it runs without any problem!

    Please Login or Register  to view this content.
    This macro starts at row 11 and works its way down to row 263 without any problem so if you have access to excel 2010 try that solver (I tested using GRG Nonlinear)

    Alf

  8. #8
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Ok, I'll try to get microsoft office 2010 then.
    Thank you for the help!

  9. #9
    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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Hope you manage to get office 2010. I'll keep on googleing to see if I can find out why it does not work in excel 2007. Perhaps the formulas are too complex?

    Alf

  10. #10
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Maybe, but I have to follow a restrict model that didn't allows me to change the formulas.
    I'm already downloading the office 2010, so the problem will be solve I hope.

  11. #11
    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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    I'm already downloading the office 2010, so the problem will be solve I hope
    Well according to my findings it should but solver works in mysterious ways it's miracles to perform!

    If it works could you please sign your thread "Solved"

    Alf

  12. #12
    Registered User
    Join Date
    05-25-2013
    Location
    Portugal
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    and finally problem [SOLVED].
    thank you very much Alf

  13. #13
    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,787

    Re: Macro with Solver. An unexpected internal error occurred, or available memory

    Thanks for feedback and glad your problem is solved.

    Alf

    Ps
    To mark your thread solved do the following:
    - Go to the first post
    - Click edit
    - Click Advance
    - Just below the word "Title:" you will see a dropdown with the word No prefix.
    - Change to Solve
    - Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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