Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Goal Seek without a macro
if any cell in my workbook changes, what VBA code do I need to get goal seek
to run automatically without calling a macro? I do not want my users to have to call a macro but rather just put in their inputs in any other cells and have goal seek automatically calculate. This is what I have so far - what am I missing? Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Sheets("Cash Flow").Select Range("d35").GoalSeek Goal:=0#, ChangingCell:=Range("b34") End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Goal Seek without a macro
LCA,
You will have to write the following in the Cash Flows sheet code (not in a module) Private Sub Worksheet_Change(ByVal Target As Range) Worksheets("Cash Flow").Range("D35").GoalSeek Goal:=0, ChangingCell:=Sheets("Cash Flow").Range("B34") End Sub "LCA" wrote: if any cell in my workbook changes, what VBA code do I need to get goal seek to run automatically without calling a macro? I do not want my users to have to call a macro but rather just put in their inputs in any other cells and have goal seek automatically calculate. This is what I have so far - what am I missing? Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Sheets("Cash Flow").Select Range("d35").GoalSeek Goal:=0#, ChangingCell:=Range("b34") End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Goal seek via macro? | Excel Discussion (Misc queries) | |||
Goal Seek in a Macro | Excel Discussion (Misc queries) | |||
Macro help for goal seek | Excel Programming | |||
Goal Seek tool in a macro | Excel Discussion (Misc queries) | |||
Goal Seek macro | Excel Programming |