Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
somewhat minute technical question about selecting each cell in a range
akh2103,
I don't know if this will answer your questions, but if you declare "n" below in your example as a Range variable, it should work just fine. I hope this helps, Conan wrote in message ps.com... 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pls tell me how in hell am I to ask a technical question in 4 wor | New Users to Excel | |||
Selecting range question | Excel Programming | |||
Difficult Pivot Table Technical Question | Excel Programming | |||
Beginner question about selecting a range | Excel Programming |