Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Another Question regarding ranges

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Another Question regarding ranges

at the top of a module

Public v as Variant

then somewhere in your code

v = Activesheet.Range("A1:B30")


then somewhere else in your code (somewhere after the above line)

msgbox " the value of the 3rd row of the 2nd " & _
"column of the range is " & v(3,2)

--
Regards,
Tom Ogilvy


" wrote:

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Another Question regarding ranges

If you terminate your pgm other than running thru the "end sub", use "exit
sub" rather than "end". End resets all variables. I learned about this the
hard way.

"Tom Ogilvy" wrote:

at the top of a module

Public v as Variant

then somewhere in your code

v = Activesheet.Range("A1:B30")


then somewhere else in your code (somewhere after the above line)

msgbox " the value of the 3rd row of the 2nd " & _
"column of the range is " & v(3,2)

--
Regards,
Tom Ogilvy


" wrote:

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Another Question regarding ranges

End alone does that, but not End Sub. different commands.

--
Regards,
Tom Ogilvy


"Patricia Shannon" wrote in
message ...
If you terminate your pgm other than running thru the "end sub", use "exit
sub" rather than "end". End resets all variables. I learned about this

the
hard way.

"Tom Ogilvy" wrote:

at the top of a module

Public v as Variant

then somewhere in your code

v = Activesheet.Range("A1:B30")


then somewhere else in your code (somewhere after the above line)

msgbox " the value of the 3rd row of the 2nd " & _
"column of the range is " & v(3,2)

--
Regards,
Tom Ogilvy


" wrote:

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Another Question regarding ranges

Right, that's what I thought I said.

"Tom Ogilvy" wrote:

End alone does that, but not End Sub. different commands.

--
Regards,
Tom Ogilvy


"Patricia Shannon" wrote in
message ...
If you terminate your pgm other than running thru the "end sub", use "exit
sub" rather than "end". End resets all variables. I learned about this

the
hard way.

"Tom Ogilvy" wrote:

at the top of a module

Public v as Variant

then somewhere in your code

v = Activesheet.Range("A1:B30")


then somewhere else in your code (somewhere after the above line)

msgbox " the value of the 3rd row of the 2nd " & _
"column of the range is " & v(3,2)

--
Regards,
Tom Ogilvy


" wrote:

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Another Question regarding ranges

Actually, I'm glad you added your remark, because it is probably more clear
to others than the way I worded it.

"Tom Ogilvy" wrote:

End alone does that, but not End Sub. different commands.

--
Regards,
Tom Ogilvy


"Patricia Shannon" wrote in
message ...
If you terminate your pgm other than running thru the "end sub", use "exit
sub" rather than "end". End resets all variables. I learned about this

the
hard way.

"Tom Ogilvy" wrote:

at the top of a module

Public v as Variant

then somewhere in your code

v = Activesheet.Range("A1:B30")


then somewhere else in your code (somewhere after the above line)

msgbox " the value of the 3rd row of the 2nd " & _
"column of the range is " & v(3,2)

--
Regards,
Tom Ogilvy


" wrote:

How do you go about holding a range in memory? Where you can recall
that data to be used elsewhere. I have a couple of instantances where
it would be far easier for me to do that...

Thanks,

Hans





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
Question about dynamic ranges The Narcissist Excel Discussion (Misc queries) 4 December 19th 08 01:02 PM
named ranges question Chris Excel Worksheet Functions 2 September 6th 08 01:46 PM
simple? question about ranges hke[_22_] Excel Programming 3 November 16th 04 07:53 PM
FormulaArray and Ranges Question akondra[_2_] Excel Programming 0 October 9th 04 04:09 PM
FormulaArray and Ranges Question akondra Excel Programming 3 October 9th 04 12:47 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"