F
Fixit_Steve
I'm using a spin button on a worksheet and I want to call a subroutine that
performs a GoalSeek from the spinbutton_spindown procedure. I have the
following spinbutton procedure and goalseek procedure.
Private Sub Cout_Spin_SpinDown()
Worksheets("Capacitors").Calculate
Range("Cout").Value =
Worksheets("Capacitors").Range("Cap_next_value_down")
Worksheets("Data").Calculate
Calc_Crossover
Worksheets("Main").Calculate
End Sub
Sub Calc_Crossover()
Range("C45").GoalSeek Goal:=0, ChangingCell:=Range("B45")
End Sub
The Calc_Crossover works fine when I run it as a macro. I have tried to run
it programatically with the Calc_crossover routine in a separate module and
on the same sheet as the spin_button routine. The range used for the
GoalSeek is on a separate worksheet "Data", however, I have used the
worksheets object to try to specify this as well and it still doesn't work.
I get the "GoalSeek method of Range object failed" message.
I have the application in manual calculation mode and used range
calculations to control the recalculation.
Can anybody offer any suggestions on what I might try? Thanks!
performs a GoalSeek from the spinbutton_spindown procedure. I have the
following spinbutton procedure and goalseek procedure.
Private Sub Cout_Spin_SpinDown()
Worksheets("Capacitors").Calculate
Range("Cout").Value =
Worksheets("Capacitors").Range("Cap_next_value_down")
Worksheets("Data").Calculate
Calc_Crossover
Worksheets("Main").Calculate
End Sub
Sub Calc_Crossover()
Range("C45").GoalSeek Goal:=0, ChangingCell:=Range("B45")
End Sub
The Calc_Crossover works fine when I run it as a macro. I have tried to run
it programatically with the Calc_crossover routine in a separate module and
on the same sheet as the spin_button routine. The range used for the
GoalSeek is on a separate worksheet "Data", however, I have used the
worksheets object to try to specify this as well and it still doesn't work.
I get the "GoalSeek method of Range object failed" message.
I have the application in manual calculation mode and used range
calculations to control the recalculation.
Can anybody offer any suggestions on what I might try? Thanks!