countryfan_nt
Well-known Member
- Joined
- May 19, 2004
- Messages
- 758
Hello friends, hope all is well.
the below code works smoothly, but I want to add another action.
I want both codes to be placed in the same sheet module, and to take actions simultaneously please:
thank you so much in advance!
the below code works smoothly, but I want to add another action.
I want both codes to be placed in the same sheet module, and to take actions simultaneously please:
thank you so much in advance!
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("S16")) Is Nothing Then Exit Sub
With Target
If Range("s16").Value = "w/o Ins" Then
Range("18:18,30:30").Select
Selection.EntireRow.Hidden = True
Range("A1").Select
End If
If Range("s16").Value <> "w/o Ins" Then
Range("18:18,30:30").Select
Selection.EntireRow.Hidden = False
Range("A1").Select
End If
End With
End Sub
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("R16")) Is Nothing Then Exit Sub
With Target
If Range("R16").Value = "Dubai" Then
Range("17:17,29:29").Select
Selection.EntireRow.Hidden = False
Range("A1").Select
End If
If Range("R16").Value <> "Dubai" Then
Range("17:17,29:29").Select
Selection.EntireRow.Hidden = True
Range("A1").Select
End If
End With
End Sub