#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default VBA coding

How can I declare a variable and then assign to a row so that it can be used
in a for loop?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA coding

Hi Nir20,

Dim rw As Long

For Each rw In Selection.Rows
'Processing code
Next rw


---
Regards,
Norman



"nir020" wrote in message
...
How can I declare a variable and then assign to a row so that it can be
used
in a for loop?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default VBA coding

I think that should be

Dim rw As Range

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Norman Jones" wrote in message
...
Hi Nir20,

Dim rw As Long

For Each rw In Selection.Rows
'Processing code
Next rw


---
Regards,
Norman



"nir020" wrote in message
...
How can I declare a variable and then assign to a row so that it can be
used
in a for loop?

Thanks





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default VBA coding

Hi Bob,

It certainly should!

Thank you,


---
Regards,
Norman



"Bob Phillips" wrote in message
...
I think that should be

Dim rw As Range

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Norman Jones" wrote in message
...
Hi Nir20,

Dim rw As Long

For Each rw In Selection.Rows
'Processing code
Next rw


---
Regards,
Norman



"nir020" wrote in message
...
How can I declare a variable and then assign to a row so that it can be
used
in a for loop?

Thanks







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
Coding metaltecks Excel Discussion (Misc queries) 1 April 17th 06 10:12 PM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM
coding help again tom mcdonald[_2_] Excel Programming 2 June 17th 05 02:19 PM
Coding Tom Ogilvy Excel Programming 0 September 9th 04 01:44 PM


All times are GMT +1. The time now is 09:54 AM.

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

About Us

"It's about Microsoft Excel"