Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Syntax for stopping a Do Loop? | Excel Discussion (Misc queries) | |||
Syntax - Loop through rows in a selection | Excel Programming | |||
Do...Loop syntax help? | Excel Programming | |||
What is the selection syntax | Excel Programming | |||
loop syntax | Excel Programming |