VisibleRange addresses to Array

  • Thread starter Thread starter Giff
  • Start date Start date
G

Giff

Does anyone know of a way to input the address of each cell in the
visible range (I've been using ActiveWindow.VisibleRange as a test)
into an array?
 
Sub liminal()
n = ActiveWindow.VisibleRange.Count
Dim ar() As String
ReDim ar(n) As String
i = 0
For Each r In ActiveWindow.VisibleRange
ar(i) = r.Address
i = i + 1
Next
End Sub
 
Dim aryAddresses As Variant

aryAddresses =
ActiveWindow.VisibleRange.SpecialCells(xlCellTypeVisible).Address


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Back
Top