+ Reply to Thread
Results 1 to 9 of 9

Cannot run the macro 'Solver.xlam!MainEx'

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2018
    Location
    Bulgaria
    MS-Off Ver
    2007
    Posts
    34

    Cannot run the macro 'Solver.xlam!MainEx'

    Hello, I recently upgraded Excel to 2019 version, and when I tried to start Solver I get the message "Cannot run the macro 'Solver.xlam!MainEx'. The macro may not be in this workbook, or all macros are disabled" (Or something like that). I tried everything I could find online, my macros are enabled, I ticked "Solver" in VBA ->Tools->Preferences, the file is saved with *.xlsm extension. I also recorder simple macro and executed it, no problems with that.
    It is strange also that other add-ins using macros are also not working, like Euro currency tool. Not that I've used it, but I just added it along with solver to see what will happen.
    Any help?
    Last edited by Petkov; 10-02-2022 at 04: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,794

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Have you checked that you also have set a reference to "Visual Basic for Applications" in VBA->Tools->Refences?

    Alf

  3. #3
    Registered User
    Join Date
    11-07-2018
    Location
    Bulgaria
    MS-Off Ver
    2007
    Posts
    34

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Yes, it is checked. Actually, it is not possible to uncheck it, it says "Can't remove control or reference; in use".
    But there is another message on startup, which says "Compile error in hidden code", I've attached image of the dialog box. Maybe there are issues with compatibility
    Attachment 798593

  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,794

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Sorry I can't see your uploaded image. Clicking on the the link this is what i see one of the forum glitches that have not been fixed.

    auplod.jpg

    To get a working upload that can be seen by other forum members one way is to fix that is to add the image as you did, save the post and look if you can see the image. If you don't see it edit your post i.e. remove the image and add it again then save post. Normally this is sufficient to get a visible image. The one I posted had the same problem as yours but editing my post and uploading the image a second time fix it and made it visible.

    I think you should upload your file instead then one have a chance to test and see if one gets the same error message as you did. As I also has Office 2019 on my PC I do have a chance t6o test your file in the same environment as you are using.


    Alf
    Last edited by Alf; 10-01-2022 at 02:18 AM.

  5. #5
    Registered User
    Join Date
    11-07-2018
    Location
    Bulgaria
    MS-Off Ver
    2007
    Posts
    34

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Actually, the problem is present even with no file opened. The message I get is upon Excel start. I'll try to upload the image of the dialog box again
    This particular error message pop up even without any file opened, and when closing the program also. The other error messages like 'Cannot run macro 'Solver.xlam!MainEx';
    EUROTOOL.XLAM!Onribbonload; SOLVER.XLAM!GetSolverLabel pop up when I open new blank page.

    Actually, the Help button on the dialog box redirects to MS site https://learn.microsoft.com/en-us/of...ulemodule-name
    , where it is explained that:

    This error commonly occurs when code is incompatible with the version or architecture of this application (for example, code in a document targets 32-bit Microsoft Office applications but it is attempting to run on 64-bit Office).[/I][/I]

    But I haven't found any solution to this problem.

    2022-09-30.jpg

  6. #6
    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,794

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Oh dear this seems like a though one to solve. Perhaps this link could be of help:

    https://answers.microsoft.com/en-us/...f-bd16110396ac
    or perhaps this link:
    https://www.repairmsexcel.com/blog/f...n-module-excel

    Alf

  7. #7
    Registered User
    Join Date
    11-07-2018
    Location
    Bulgaria
    MS-Off Ver
    2007
    Posts
    34

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Tried everything described in the links with no success. Eventually I uninstalled completely Office, and reinstalled 32 bit version this time (At first it was 64bit version). It worked, no more error messages.
    Thank you for your time and tips.
    Hope that this thread is helpful

  8. #8
    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,794

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Glad you managed to solve this problem.

    So if I understand your problem properly your excising Office 2010 version was a 32 bit and then you installed Office 2019 64 bit. According to Microsoft this should not be possible https://support.microsoft.com/en-us/...a-ab085b38597f
    as you should get a warning telling you that this installation can't be done.

  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,794

    Re: Cannot run the macro 'Solver.xlam!MainEx'

    Well it seems we can't always trust Microsoft products to behave the way Microsoft tells us they should.

    Alf

+ 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. macro add-in * .xlam
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-27-2021, 02:16 PM
  2. error macro *.xlam
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-27-2021, 05:19 AM
  3. [SOLVED] FileSystemObject macro does not work as .xlam file
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-08-2017, 02:19 AM
  4. calling Macro from Add-In .xlam file, failing
    By lhse44 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-31-2015, 06:22 PM
  5. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  6. Can't start Solver. Error message says Solver.xlam already open.
    By DaveHills in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 10-21-2012, 11:02 AM
  7. solver macro + simulation code + not updating solver values
    By sabinemaria in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 11:37 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