1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
Sub get_selected_rows() Set dic = CreateObject("scripting.dictionary") For Each r In Selection If Not dic.exists(r.Row) Then dic.Add r.Row, "" Next ReDim selected_rows(dic.Count - 1) k = dic.keys For i = 0 To dic.Count - 1 selected_rows(i) = k(i) Next i For Each r In selected_rows MsgBox r Next End Sub |