+ Reply to Thread
Results 1 to 3 of 3

Solver Issue

Hybrid View

  1. #1
    Registered User
    Join Date
    03-02-2008
    Posts
    39

    Solver Issue

    How do I utilize the solver function in VBA without referencing cells but instead using my variables in VBA? Here t is not changing. I get no errors but it's not solving for t,it remains 1 at the end.
    t = 1
    SolverReset
    SolverOk SetCell:="(2 * Application.Abs(msol) * 3 * Radius) / ((Pi / 4) * (Radius ^ 4 - (Radius - t) ^ 4))", MaxMinVal:=3, ValueOf:=AllowStress, ByChange:="t"
    SolverSolve userFinish:=True
    SolverFinish KeepFinal:=1
    
    Worksheets("ReadMe").Range("A2") = t
    Thanks,
    Last edited by VBA Noob; 08-15-2008 at 02:07 PM.

  2. #2
    Registered User
    Join Date
    03-02-2008
    Posts
    39
    Come on............someone has got to be able to help me!! I'm going nuts trying to figure this out.

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    According to Help, SetCell has to be a cell on the worksheet. Ditto for ByChange, which is never going to evaluate the string "t".

    Why not make it so?

+ 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