zeroaccess
Active member
- Local time
- Today, 17:32
- Joined
- Jan 30, 2020
- Messages
- 671
NGINX:
Sub HideAllMenus()
Dim ctrl As Control
For Each ctrl In Screen.ActiveForm.Controls
If ctrl.Tag = "MenuAdmin" Or "MenuReports" Then
If Not ctrl.Visible = False Then
ctrl.Visible = False
End If
End If
Next
End Sub
This works great when only one of the items is listed (for example just "MenuAdmin"), but when using OR, I get "Type mismatch". Thanks from this VBA newbie.