Is a cell visible

J

John

I tried this and it does not work how come

If Range("N9").SpecialCells(xlCellTypeVisible) = True Then
MsgBox "True"
Else
MsgBox "False"
End If
 
A

Andy Pope

Hi,

Here are a couple of ways.

If Intersect(Range("N9"), Range("N9").SpecialCells(xlCellTypeVisible)) Is
Nothing Then
MsgBox "Invisible"
Else
MsgBox "Visible"
End If

Or

With Range("N9")
If .EntireRow.Hidden Or .EntireColumn.Hidden Then
MsgBox "Invisible"
Else
MsgBox "Visible"
End If
End With

Cheers
Andy
 
J

John

THANKS

One more question. Is there a way to show progamatically to toggle
between the filtered and unfiltered view?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top