Currently the Code works, but only if I enter the data manually into a cell. Currently the cell updates via a formula
I have tried making the application volatile and aplication calculation automatic but it added no difference.
Formula is placed continuously in column H is as follows.
=IF(N7=0,"decrease","expand")
VBA Code is as follows
Code
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Call Script1(Target)
Call Script2(Target)
End Sub
Private Sub Script1(ByVal Target As Range)
Application.Volatile
Application.Calculation = xlCalculationAutomatic
If Cells(Target.Row, 8).Value = "expand" And Cells(Target.Row, 8).Value = "expand" Then _
Target.RowHeight = 30
End Sub
Private Sub Script2(ByVal Target As Range)
Application.Volatile
Application.Calculation = xlCalculationAutomatic
If Cells(Target.Row, 8).Value = "decrease" And Cells(Target.Row, 8).Value = "decrease" Then _
Target.RowHeight = 14.5
End Sub
Display More
As stated before currently the code only works if I manually type "decrease" or "expand" into the cells, not when the formula updates automatically.