Advertisement
kecske123

Untitled

Feb 21st, 2020
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. dim lStartRow as long, lLastRow as long, wsData as worksheet, rngArea as range, rngRow as range
  2. set wsData = thisworkbook.worksheets("mysheet")
  3. lStartRow = 1
  4. lLastRow = wsData.Cells.Find(What:="*", _
  5.                     After:=wsData.Range("A1"), _
  6.                     LookAt:=xlPart, _
  7.                     LookIn:=xlFormulas, _
  8.                     SearchOrder:=xlByRows, _
  9.                     SearchDirection:=xlPrevious, _
  10.                     MatchCase:=False).Row
  11. for each rngArea in wsData.range(lStartRow & ":" & lLastRow).SpecialCells(xlCellTypeVisible).Areas
  12.     for each rngRow in rngArea.rows
  13.         msgbox "Row " & rngRow.row & " is visible"
  14.     next rngRow
  15. next rngArea
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement