+ Reply to Thread
Results 1 to 4 of 4

How do I Assign Solver to a Command Button in VBA

  1. #1
    Registered User
    Join Date
    09-19-2021
    Location
    Singapore
    MS-Off Ver
    2013
    Posts
    15

    How do I Assign Solver to a Command Button in VBA

    Hello, I'm trying to assign the solver function to a command button in VBA but it says there is an error. I recorded macro and pasted my solver code under the command button but it results in an error. How do I correct this please?

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    370

    Re: How do I Assign Solver to a Command Button in VBA

    Have you added a reference to Solver in your VBA project?

    You can delete the double instructions, and use

    Please Login or Register  to view this content.
    HTH,

    Francesco
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    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: How do I Assign Solver to a Command Button in VBA

    Identical problem, different name. Cross post?

    https://www.reddit.com/r/excel/comme...ess_a_command/

    Alf

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,717

    Re: How do I Assign Solver to a Command Button in VBA

    shuxin

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    Thanks to Alf for providing the link.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. [SOLVED] How to assign the form in the command button.
    By somani123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2014, 02:32 PM
  2. [SOLVED] Assign a macro to a command button
    By Quicksnot in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-13-2012, 12:35 PM
  3. Assign macro to command button
    By krymer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2011, 08:58 AM
  4. Solver not running with command button
    By gtg430i in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2009, 03:43 PM
  5. Can't Assign Macro to Command Button??
    By Novice_704 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-19-2008, 12:28 AM
  6. Assign MAcro to command button
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-04-2006, 02:38 PM
  7. Assign Macro to Command Button
    By adamaagard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-11-2006, 12:40 PM

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