Hi friends,
I am using the below code to hide unhide rows based
The problem is the code triggers every time a change is made to the sheet.
Can we just set the code to trigger only when a specific cell is changed.
In my case its cell E17
Regards,
Humayun
I am using the below code to hide unhide rows based
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect
ActiveWorkbook.UpdateLink Name:= _
"\\192.168.0.100\itex Share\ITEX\DATA ENTRY.xlsm", Type:=xlExcelLinks
Dim xRg As Range
Application.ScreenUpdating = False
For Each xRg In Range("A23:A52,A61:A85")
If xRg.Value = True Then
xRg.EntireRow.Hidden = False
Else
xRg.EntireRow.Hidden = True
End If
Next xRg
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True
End Sub
The problem is the code triggers every time a change is made to the sheet.
Can we just set the code to trigger only when a specific cell is changed.
In my case its cell E17
Regards,
Humayun