ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clearing public arrays (https://www.excelbanter.com/excel-programming/345308-clearing-public-arrays.html)

J Streger

Clearing public arrays
 
I am using several 2 simentional arrays as public arrays so that I can pass
the same array through a set of code regardless of where it comes from. I
notice that if I run a proecure involving these arrays, everything is fnie
the first time around. If I then activate the same procedure again, I find
the arrays still have saved their dimensions from the first run, and when I
redim to set the first dimension, I get an error (since you can't change the
first dimension once the second is declared.

Is there anyway to clear the cache of these public arrays inbetween
procedure runs?

If I hit the stop in VBA, it clears the arrays, but obviously that's a bit
cumbersome. Thanks for any help.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003


Bob Phillips[_6_]

Clearing public arrays
 
Erase aryName

--

HTH

RP
(remove nothere from the email address if mailing direct)


"J Streger" wrote in message
...
I am using several 2 simentional arrays as public arrays so that I can

pass
the same array through a set of code regardless of where it comes from. I
notice that if I run a proecure involving these arrays, everything is fnie
the first time around. If I then activate the same procedure again, I find
the arrays still have saved their dimensions from the first run, and when

I
redim to set the first dimension, I get an error (since you can't change

the
first dimension once the second is declared.

Is there anyway to clear the cache of these public arrays inbetween
procedure runs?

If I hit the stop in VBA, it clears the arrays, but obviously that's a bit
cumbersome. Thanks for any help.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003




J Streger

Clearing public arrays
 
Thanks a lot Bob.
--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003



"Bob Phillips" wrote:

Erase aryName

--

HTH

RP
(remove nothere from the email address if mailing direct)


"J Streger" wrote in message
...
I am using several 2 simentional arrays as public arrays so that I can

pass
the same array through a set of code regardless of where it comes from. I
notice that if I run a proecure involving these arrays, everything is fnie
the first time around. If I then activate the same procedure again, I find
the arrays still have saved their dimensions from the first run, and when

I
redim to set the first dimension, I get an error (since you can't change

the
first dimension once the second is declared.

Is there anyway to clear the cache of these public arrays inbetween
procedure runs?

If I hit the stop in VBA, it clears the arrays, but obviously that's a bit
cumbersome. Thanks for any help.

--
*********************
J Streger
MS Office Master 2000 ed.
MS Project White Belt 2003






All times are GMT +1. The time now is 02:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com