Hi - I am receiving a an error when inputting an hard return after the OR (Expected Then or Go To). The error goes away if I remove the hard return and all OR's are on one line. Am I confinded to putting all OR's on one line?
Private Sub Worksheet_Change(ByVal Target As Range)
'Ensure the cells with Show/Hide are specified below
If Intersect(Target, Range("c410", "c21")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Dim ws As Worksheet
'Master File Reports
If Target.Address = "$C$21" And Target = "Show Detail" Then
For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "MF-Client" Or ws.Name Like "361 - Client"
Or ws.Name Like "771-Client" Or ws.Name Like "MF-Employees" And ws.Visible = False Then
ws.Visible = True
End If
Next ws
Private Sub Worksheet_Change(ByVal Target As Range)
'Ensure the cells with Show/Hide are specified below
If Intersect(Target, Range("c410", "c21")) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Dim ws As Worksheet
'Master File Reports
If Target.Address = "$C$21" And Target = "Show Detail" Then
For Each ws In ActiveWorkbook.Worksheets
If ws.Name Like "MF-Client" Or ws.Name Like "361 - Client"
Or ws.Name Like "771-Client" Or ws.Name Like "MF-Employees" And ws.Visible = False Then
ws.Visible = True
End If
Next ws