View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default load addresses of selected cells into array

Option Explicit
Sub testme()
Dim v As Variant, i As Long
Dim cell As Range
ReDim v(1 To Selection.Count, 1 To 2)
i = 1
For Each cell In Selection
v(i, 1) = cell.Row
v(i, 2) = cell.Column
i = i + 1
Next
End Sub

galefly wrote:

Tom,

thanks.. it bombed on CELL, "variable not defined"


--

Dave Peterson