VBA: How to trigger a worksheet event function by an automatic cell change trough a link?

Posted by Jesse on Stack Overflow See other posts from Stack Overflow or by Jesse
Published on 2010-04-29T07:20:12Z Indexed on 2010/04/29 14:37 UTC
Read the original article Hit count: 232

Filed under:

Hi,

My problem is the following: The function below triggers an "if then function" when i manually change the value in cell D9. What should I do to get it to work with an automatic value change of cell D9 trough a link.

In other words if i where to link cell D9 to cell A1 and change the value of A1 can i still make the function below work?

Thanks in advance

Private Sub Worksheet_Change(ByVal Target As range)

If Target.Address = "$D$9" Then

If range("C12") = 0 Then Rows("12:12").Select Selection.RowHeight = 0 Else: Rows("12:12").Select Selection.RowHeight = 15

End If

End Sub

© Stack Overflow or respective owner

Related posts about excel-vba