What variable controls wheatehr a cell is visible?

  • Thread starter Thread starter WCyrek
  • Start date Start date
W

WCyrek

Hi

If a cell is invisible is there something along the lines
ActiveCell.(Blank) = False I can check for?
 
If the cell is invisible it is either in a row that is hidden or a
column that is hidden. If you know exactly what cell you’re looking
for then you can check both.

Worksheets(1).Row(5).Hidden = False
Worksheeds(1).Columns(“D”).Hidden = False

- Pikus
 
If ActiveCell.EntireRow.Hidden then


demo'd from the immediate window in the VBE:

? ActiveCell.Address
$B$24
? ActiveCell.EntireRow.Hidden
False
activecell.EntireRow.Hidden = True
? activeCell.EntireRow.Hidden
True
 
Finally I wrote the function I wanted all along:

Private Function IncrimentNext()
ActiveCell.Offset(1, 0).Select
If ActiveCell.EntireRow.Hidden Then
Call IncrimentNext
End If
End Function

Thnx
 
That does a recusive call which is fine, but it is easily done with a loop

Private Function IncrimentNext()
Do
ActiveCell.Offset(1,0).Select
Loop Until Not ActiveCell.EntireRow.Hidden
End Function
 
Back
Top