Select Activecell in Range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everybody
I have code that references to the ActiveCell and I would like to use this
code looping through a range selection. If I code as follows

For Each cell in Selection
‘MyCode in here
Next cell
This does not change the ActiveCell

How can I loop through a range selection making each cell become the
Activecell

Example
Range("A3,A6,A9").Select
For Each cell In Selection

' Make cell ActiveCell
' Code that references to the Activecell

Next cell

Many Thanks in advance.
 
It is highly unlikely that you need to activate each cell, it is slow, and a
drag on your app.

For Each cell In Range("A3,A6,A9").
Msgbox cell.address
Next cell

as an example. Use the cell object to work upon the cell without moving.
 
Back
Top