Closed Thread
Results 1 to 3 of 3

VBA Run Solver Macro

  1. #1
    Registered User
    Join Date
    06-28-2016
    Location
    Southampton
    MS-Off Ver
    2010
    Posts
    8

    VBA Run Solver Macro

    Evening all!

    I have just joined the forum, great to see so many people helping each other, I hope as I learn more I can add something!

    I do have a problem I am trying to solve and wonder if I could ask for help please. Any help is much appreciated.

    I am trying to make a VBA button to run solver in Excel 2010. I have managed all the solver and am happy with this and tried using the record button simply to activate that work but unfortunatley I cant get it to work. I have tried to attach the spreadsheet here but dont think I can unfortunately.

    Is there anyone who may now how to make this run please. Its just a solver to optimise the U Stat (cell N6) by adjusting the figures in Alpha (cell Q2), Beta (Q3), and Gamma (Q4) between 0 and 1.

    Any help or advise is much appreciated. I copy the macro recorded below in case for some people its obvious what I have missed!

    Sub VBASolverUSTAT()
    '
    ' VBASolverUSTAT Macro
    '

    '
    SolverOk SetCell:="$N$6", MaxMinVal:=2, ValueOf:=0, ByChange:="$Q$2:$Q$4", _
    Engine:=3, EngineDesc:="Evolutionary"
    SolverSolve
    End Sub

    I can't seem to attach the spreadsheet, is this not possible in order to protect people from viruses etc? Im hoping its now attached!

    Best regards,

    Paul
    Last edited by chillepepper101; 06-28-2016 at 04:56 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: VBA Run Solver Macro

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: VBA Run Solver Macro

    Thread opened in Commercial services subforum so I'm closing this one.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 04-27-2016, 03:05 PM
  2. Replies: 0
    Last Post: 07-20-2014, 12:45 PM
  3. macro not keeping solver solutions when solver is successful
    By jimmypants in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-10-2014, 01:45 AM
  4. Replies: 6
    Last Post: 05-18-2013, 05:49 AM
  5. 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
  6. 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
  7. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM

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