Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Question about dynamic ranges | Excel Discussion (Misc queries) | |||
named ranges question | Excel Worksheet Functions | |||
simple? question about ranges | Excel Programming | |||
FormulaArray and Ranges Question | Excel Programming | |||
FormulaArray and Ranges Question | Excel Programming |