Results 1 to 8 of 8

Compile error: Sub or Function not defined

Threaded View

  1. #1
    Registered User
    Join Date
    06-18-2010
    Location
    Geraldton, Australia
    MS-Off Ver
    Excel 2003
    Posts
    6

    Compile error: Sub or Function not defined

    I've started to record a simple macro to automate the use of Solver however the macro will not run due to the error message "Compile error: Sub or Function not defined" (see attached). The macro doesn't start and stops with the first line highlighted "SolverReset". Other macros with similar use of Solver do not have a problem. Appreciate any help regarding this problem.
    Sub Macro1()
    '
    SolverReset
        SolverOk SetCell:="$C$81", MaxMinVal:=2, ValueOf:="0", ByChange:="$C$59:$C$64"
        SolverAdd CellRef:="$C$84", Relation:=2, FormulaText:="sum($C$85:$C$89)"
        SolverOk SetCell:="$C$81", MaxMinVal:=2, ValueOf:="0", ByChange:="$C$59:$C$64"
        SolverSolve
    End Sub
    Attached Files Attached Files
    Last edited by Nanga; 06-20-2010 at 04:38 PM. Reason: Added code text

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