Article ID: 153442
Article Last Modified on 10/10/2006
Run-Time Error 1004: Error in Formula
Sub SolverOkDemo()
Sheets("Sheet1").Select
Range("C1").Select
ActiveCell.Formula = "=a1+b1"
' Solver.Ok Parameters
Set_Cell = Range("C1").Address(True, True, xlR1C1, True)
Max_Min_Val = 3
Value_Of = 21
By_Changing = Range("a1:b1").Address(True, True, xlR1C1, True)
Application.ExecuteExcel4Macro _
String:="'[SOLVER.XLA]SOLVER'!SOLVER.OK(" _
& Set_Cell & "," & Max_Min_Val & "," & Value_Of & "," & _
By_Changing & ")"
Application.ExecuteExcel4Macro _
String:="'[SOLVER.XLA]SOLVER'!SOLVER.SOLVE()"
End Sub
176476 OFF: Office Assistant Not Answering Visual Basic Questions
SolverOkFor more information about Solver.OK in Microsoft Excel version 5.0, choose Contents in help, Click Reference Information, and then choose the Search button and type:
Solver.okFor additional information about getting help with Visual Basic for Applications, please see the following article in the Microsoft Knowledge Base:
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 5.00a 5.00c Solve Solver.Ok Error XL
Keywords: kbdtacode kberrmsg kbhowto kbprogramming KB153442