PC Review


Reply
Thread Tools Rate Thread

Re: [Excel 2010] For Each behavior that I don't understand

 
 
James Ravenswood
Guest
Posts: n/a
 
      19th Aug 2012
The first loop is a loop over columns and there is only one. COnsider:

Public Sub test()

Dim currev As Variant

Range("A1:C4") = "a value"

For Each currev In Range("A1").CurrentRegion.Columns(1)
MsgBox currev.Address
Next

For Each currev In Range("A1").CurrentRegion.Columns(1).Cells
MsgBox currev.Address
Next

End Sub
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Excel 2010] For Each behavior that I don't understand Don Guillett Microsoft Excel Programming 0 19th Aug 2012 02:30 PM
To MSFT Engineers - others. Help understand Collection Behavior JimGreen Microsoft C# .NET 3 5th Jul 2005 07:57 PM
i do not understand this behavior: url tacked onto "localhost" Timo Microsoft ASP .NET 1 3rd Mar 2005 08:55 PM
Help me understand strange behavior with users and their documentsfolder Rafael Block Microsoft Windows 2000 Active Directory 1 15th Nov 2003 04:04 AM
RE: I need to understand 'lock-out' account behavior stevta [MSFT] Microsoft Windows 2000 Active Directory 0 9th Oct 2003 09:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:08 AM.