I'm not entirely new to programming, but I am new to VB and Excel Macros.
I am using Excel 2007 on Windows XP.
I have a set of fields that I have a goal seek setup with this macro:
Whenever I change the cell "I1" (row 1, column 9), it goal seeks AQ26 to equal I1 by changing F26. This macro works like a charm.
My problem starts when I try to make another macro that attempts to Goal Seek whenever F26 (row 26, column 6) changes from the previous Goal Seek.
Now, I'm not entirely sure how macro sequences work in excel. I have both of these functions in the same "module" by right clicking the WorkSheet and hitting "view code". The 2nd macro doesn't get an error, but it simply doesn't do anything. I've tripled checked the row/column's to make sure they're right.
Can a macro not work off the event of another macro?
I am using Excel 2007 on Windows XP.
I have a set of fields that I have a goal seek setup with this macro:
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Row = 1 And Target.Column = 9 Then
Range("AQ26").GoalSeek Goal:=Range("I1").Value, _
ChangingCell:=Range("F26")
End If
End Sub
My problem starts when I try to make another macro that attempts to Goal Seek whenever F26 (row 26, column 6) changes from the previous Goal Seek.
Code:
Private Sub Worksheet_Change2(ByVal Target2 As Excel.Range)
If Target2.Row = 26 And Target2.Column = 6 Then
Range("AG14").GoalSeek Goal:=Range("F26").Value, _
ChangingCell:=Range("B7")
End If
End Sub
Can a macro not work off the event of another macro?