Hello - I have two Worksheet_Change events and no luck merging these two. Any assistance would be greatly appreciated!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = ("$E$30") Then
If Target.Value = "1" Then
Rows("38:38").EntireRow.Hidden = False
Rows("39:47").EntireRow.Hidden = True
ElseIf Target.Text = "2" Then
Rows("38:39").EntireRow.Hidden = False
Rows("40:47").EntireRow.Hidden = True
ElseIf Target.Text = "3" Then
Rows("38:40").EntireRow.Hidden = False
Rows("41:47").EntireRow.Hidden = True
End If
End If
End Sub
AND
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ISSUE
If Target(1).Address = Me.Range("AJ85").Address Then
Application.EnableEvents = False
ThisWorkbook.Worksheets("Projection Summary").Range("AB17").Value = Target.Value
ThisWorkbook.Worksheets("Projection Summary").Range("AB70").Value = Target.Value
ThisWorkbook.Worksheets("Projection Summary").Range("AB133").Value = Target.Value
ThisWorkbook.Worksheets("Projection Comparison").Range("H7").Value = Target.Value
End If
Application.EnableEvents = True
Exit Sub
ISSUE:
Application.EnableEvents = True
VBA.MsgBox "Error " & Err.Number
End If
End Sub
Thanks!!!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = ("$E$30") Then
If Target.Value = "1" Then
Rows("38:38").EntireRow.Hidden = False
Rows("39:47").EntireRow.Hidden = True
ElseIf Target.Text = "2" Then
Rows("38:39").EntireRow.Hidden = False
Rows("40:47").EntireRow.Hidden = True
ElseIf Target.Text = "3" Then
Rows("38:40").EntireRow.Hidden = False
Rows("41:47").EntireRow.Hidden = True
End If
End If
End Sub
AND
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ISSUE
If Target(1).Address = Me.Range("AJ85").Address Then
Application.EnableEvents = False
ThisWorkbook.Worksheets("Projection Summary").Range("AB17").Value = Target.Value
ThisWorkbook.Worksheets("Projection Summary").Range("AB70").Value = Target.Value
ThisWorkbook.Worksheets("Projection Summary").Range("AB133").Value = Target.Value
ThisWorkbook.Worksheets("Projection Comparison").Range("H7").Value = Target.Value
End If
Application.EnableEvents = True
Exit Sub
ISSUE:
Application.EnableEvents = True
VBA.MsgBox "Error " & Err.Number
End If
End Sub
Thanks!!!