Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default 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
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
Pls tell me how in hell am I to ask a technical question in 4 wor Kleberman New Users to Excel 1 April 7th 06 12:22 PM
Selecting range question ToddG Excel Programming 12 June 7th 04 07:50 PM
Difficult Pivot Table Technical Question Heath[_2_] Excel Programming 0 December 11th 03 05:18 PM
Beginner question about selecting a range TBA[_2_] Excel Programming 3 August 15th 03 01:52 PM


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

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"