Syntax - Loop through rows in a selection

G

Guest

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
 

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

Top