Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Process all cells in a (user) selection - vba

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Process all cells in a (user) selection - vba

On 05 May 2010 11:10:21 GMT, Isis wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Process all cells in a (user) selection - vba

Ron Rosenfeld wrote in
:

Dim aCell As Range
For Each aCell In Selection
' Do Stuff Here
Next aCell


Ron, thanks very much for that - worked great !

Regards
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
selection.sort process increase file size by 4.5mb Warren Excel Programming 0 July 8th 08 09:15 AM
Help with user form - selecting more than 1 file to process drucey[_35_] Excel Programming 2 May 9th 06 01:52 PM
How to count process running time ( process not finished) miao jie Excel Programming 0 January 13th 05 09:23 AM
How to count process running time ( process not finished) miao jie Excel Programming 2 January 12th 05 06:01 AM
macro to process rows in a selection fdebruin Excel Programming 3 August 14th 04 01:14 PM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"