+ Reply to Thread
Results 1 to 2 of 2

Problem getting solver to work in macro

  1. #1
    Registered User
    Join Date
    08-26-2005
    Posts
    1

    Problem getting solver to work in macro

    I'm trying to use solver in a macro and for some reason it won't find solutions when run from the macro. When I run it from the toolbar on the same cell it works perfectly.

    I recorded the operation when I ran it manually to get the code for my macro. Here's what the recording came up with-

    SolverReset
    SolverOk SetCell:="$i$14", MaxMinVal:=2, ByChange:="$i$15"
    SolverChange CellRef:="$i$14", Relation:=3, FormulaText:="$i$13"
    SolverSolve

    Like I said, when I run solver in the worksheet, it works and that's the code it records. When I run the macro it does not work. Can anyone help me understand what's going on here?

    Thanks-

  2. #2
    Tushar Mehta
    Guest

    Re: Problem getting solver to work in macro

    See the responses in the other discussion on the same subject that you
    started in the same newsgroup!

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <[email protected]>,
    [email protected] says...
    >
    > I'm trying to use solver in a macro and for some reason it won't find
    > solutions when run from the macro. When I run it from the toolbar on
    > the same cell it works perfectly.
    >
    > I recorded the operation when I ran it manually to get the code for my
    > macro. Here's what the recording came up with-
    >
    > SolverReset
    > SolverOk SetCell:="$i$14", MaxMinVal:=2, ByChange:="$i$15"
    > SolverChange CellRef:="$i$14", Relation:=3, FormulaText:="$i$13"
    > SolverSolve
    >
    > Like I said, when I run solver in the worksheet, it works and that's
    > the code it records. When I run the macro it does not work. Can
    > anyone help me understand what's going on here?
    >
    > Thanks-
    >
    >
    > --
    > dlowie
    > ------------------------------------------------------------------------
    > dlowie's Profile: http://www.excelforum.com/member.php...o&userid=26676
    > View this thread: http://www.excelforum.com/showthread...hreadid=399470
    >
    >


+ 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