+ Reply to Thread
Results 1 to 6 of 6

Skipping macro message/pop up

  1. #1
    Registered User
    Join Date
    10-08-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    6

    Skipping macro message/pop up

    I am using a macro to use the solver several times consecutively, however in some instances the model is infeasible prompting the solver to present a pop up/message notifying that the model is infeasible. I would like to skip this message and letting the macro continue , instead of digging into the solver code and finding and deleting the part of the code where the message is prompted I would like to skip (as if pressing enter) the message.
    I already tried the Application.DisplayAlerts=False, which unfortunately did not work. Does anyone have a clue what code to use to do this?

  2. #2
    Registered User
    Join Date
    06-12-2010
    Location
    Hereford, England
    MS-Off Ver
    Excel 2003
    Posts
    73

    Re: Skipping macro message/pop up

    a shot in the dark but maybe try

    Please Login or Register  to view this content.
    Kind Regards

    Baz

  3. #3
    Registered User
    Join Date
    10-08-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Skipping macro message/pop up

    I already thought of that, unfortunately that does not work since the solver is run by a separate macro that I invoke/start in my own macro. So once the pop-up appears the error is already solved by the solver macro itself

  4. #4
    Registered User
    Join Date
    03-26-2012
    Location
    India
    MS-Off Ver
    excel 2007
    Posts
    21

    Re: Skipping macro message/pop up

    try this
    SolverSolve UserFinish:=false
    SolverFinish KeepFinal:=1
    CLICK the STAR icon on the left side below their user name to say thank you to those who had helped you. Thanks.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    10-08-2012
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Skipping macro message/pop up

    Unfortunately that did not work either, but after some searching I found the solution: using the sendkeys command to simulate pressing enter
    Not the most elegant solution but it works

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

    Re: Skipping macro message/pop up

    Have you tried "SolverSolve UserFinish:=True" ?

    Alf

+ 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