Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
I have this code that I want to display if no data is found, however it does not work as expected. What can be the problem? Thanks
Code:
Dim myRange As Range
Rng.AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=Range("AT14:AV15"), Unique:=False
On Error Resume Next
Set myRange = Range("A15:A" & LRow).SpecialCells(xlVisible)
On Error GoTo 0
If myRange Is Nothing Then
MsgBox "no cells"
End If