+ Reply to Thread
Results 1 to 3 of 3

VBA Solver Call -> Solver is missing or not installed properly

  1. #1
    Registered User
    Join Date
    06-11-2021
    Location
    Illinois
    MS-Off Ver
    Excel in Office 365
    Posts
    2

    Question VBA Solver Call -> Solver is missing or not installed properly

    I have been using Excel and VBA macros/programs to run workbooks/programs for application to vehicle crash reconstruction.

    I have been using (the same) Excel Solver via a VBA call for the last 16 years. In the last few weeks when I try this routine, I get an error that says “Solver is missing or not installed properly”. I have verified this error on another computer using the same software and program. I also have verified that Solver IS included in the list of installed Add-Ins on these computers and these computers have run this program recently.

    Additionally, on one of the computers, I uninstalled and reinstalled the software application that includes the program that has the VBA code and this did not solve the problem.

    I suspect that some update to Office is the reason that this call to Solver in the VBA code is not working. I welcome advice on steps I can take to solve this issue.

  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: VBA Solver Call -> Solver is missing or not installed properly

    Have you checked that you have "Analysis Toolpak" installed?

    Years ago I had problem installing Solver and I fond that "Analysis Toolpak" was missing as well. Strange as "Analysis Toolpak" should be installed by default when installing Excel.

    Installing "Analysis Toolpak" as a standalone made it possible for me to install Solver without any problem.

    Alf

  3. #3
    Registered User
    Join Date
    06-11-2021
    Location
    Illinois
    MS-Off Ver
    Excel in Office 365
    Posts
    2

    Re: VBA Solver Call -> Solver is missing or not installed properly

    Thank you for the response.

    I was poking around a little more with this issue and examined the VBA code a little closer. The macro was written a decade and a half ago with the direct engagement of a Microsoft developer.

    I was running into unresolvable issues calling Solver from VBA and I ended up talking to a Microsoft coder on the phone. So some of the code came directly from that person, including the following:

    On Error Resume Next
    Set WB = Workbooks("solver.xla")
    If Err.Number <> 0 Then
    Err.Clear
    Workbooks.Open(AddIns("Solver Add-In").FullName).RunAutoMacros xlAutoOpen
    If Err.Number <> 0 Then
    MsgBox "Solver is missing or not installed properly."
    Exit Sub
    End If
    ThisWorkbook.Activate
    End If
    On Error GoTo 0
    Err.Clear
    Set WB = Nothing

    So the message box I have been seeing came from my VBA code, not the Excel system. I commented out this code and the VBA program runs again.

    I don't know what changed in the Excel environment that this code snippet causes an error, but I can investigate that at my leisure now that the program runs.

    Thank you.

+ 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. Replies: 5
    Last Post: 10-09-2020, 03:33 AM
  2. Solver Installed, but not generating a result
    By EricGoldman in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-02-2016, 01:44 PM
  3. Setting the solver properly
    By altaris in forum Excel General
    Replies: 3
    Last Post: 06-28-2016, 01:38 PM
  4. need solver to call VBA function
    By twd000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-03-2008, 11:31 PM
  5. need solver to call VBA function
    By twd000 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-03-2008, 07:46 PM
  6. Solver unavailable after installed
    By jjbf22 in forum Excel General
    Replies: 1
    Last Post: 12-08-2005, 02:25 PM
  7. [SOLVED] how can call up solver with a button
    By Muzhik in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-15-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