B
Bill Allen
I'm writing one of my first macros and I would appreciate some help.
I am trying to automate the Solver add-in. I started by using the macro
recorder which generated the following:
Sub SolveForK()
'
' SolveForK Macro
' Macro recorded 1/29/2005 by Bill Allen, S.E.
'
' Keyboard Shortcut: Ctrl+Shift+K
'
SolverOk SetCell:="$R$5", MaxMinVal:=3, ValueOf:="0", ByChange:="$Q$5"
SolverSolve
End Sub
Question 1:
When I try to execute the code, I get the following error:
With the "SolverOk" highlighted, the error reads:
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:
Sub or Function not defined
---------------------------
OK Help
---------------------------
What is wrong with the code? What do I need to fix?
Thanks,
Bill
I am trying to automate the Solver add-in. I started by using the macro
recorder which generated the following:
Sub SolveForK()
'
' SolveForK Macro
' Macro recorded 1/29/2005 by Bill Allen, S.E.
'
' Keyboard Shortcut: Ctrl+Shift+K
'
SolverOk SetCell:="$R$5", MaxMinVal:=3, ValueOf:="0", ByChange:="$Q$5"
SolverSolve
End Sub
Question 1:
When I try to execute the code, I get the following error:
With the "SolverOk" highlighted, the error reads:
---------------------------
Microsoft Visual Basic
---------------------------
Compile error:
Sub or Function not defined
---------------------------
OK Help
---------------------------
What is wrong with the code? What do I need to fix?
Thanks,
Bill