View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] akh2103@gmail.com is offline
external usenet poster
 
Posts: 28
Default somewhat minute technical question about selecting each cell in a range

Hello--I am a VB newbie and I have noticed that the most common way
that one cycles thru a each cell in a range to perform an action is by
for/each code that goes something like...

Sub MultiplyInRange()
For Each n in Selection
n.Value = n.Value * 3
Next
End Sub()

I am wondering, what sort of object is our "n" in this example--i.e.
what sorts of objects are the class-members in a range? I ask both
because I want to understand what is going on and because I am trying
to declare all variable types to save memory when the program is
running.