Process all cells in a (user) selection - vba

  • Thread starter Thread starter Isis
  • Start date Start date
I

Isis

I am using this code to give me cell by cell access to a code defined
selection;

Dim aCell As Range
For Each aCell In Sheet4.Range("A4:A34")
' Do Stuff Here
Next aCell

which processes every cell in the A4:A34 Range

How do I do the same thing for a selection drawn by the user before
pressing my 'Process' button ?

Thanks
 
I am using this code to give me cell by cell access to a code defined
selection;

Dim aCell As Range
For Each aCell In Sheet4.Range("A4:A34")
' Do Stuff Here
Next aCell

which processes every cell in the A4:A34 Range

How do I do the same thing for a selection drawn by the user before
pressing my 'Process' button ?

Thanks


Dim aCell As Range
For Each aCell In Selection
' Do Stuff Here
Next aCell
--ron
 
Back
Top