Syntax - Loop through rows in a selection
I want to modify the following code that loop through each item in a selection
-----
Dim x as Range
For Each x In Selection
retrievename = Sheets("EmailList").Range("B" & x.Row).value
Next x
------
I want it to only loop through each row in the selection (not each item)
What is the proper syntax
I thought Maybe this would work ... but I was wrong. It loops the proper
number of times however SelectRow always refers to the first row that is
selected
--------
For counter = 1 To Selection.Rows.Count
SelectRow = Selection.row
retrievename = Sheets("EmailList").Range("B" & SelectRow).value
Next counter
|