Application level array?

Results 1 to 2 of 2

Thread: Application level array?

  1. #1
    Swami Guest

    Default Application level array?

    Can I load a small array into an application variable without getting a type mismatch error? If so, how?<BR>application("arVar") = arVar <BR>doesn&#039t work...

  2. #2
    Join Date
    Dec 1969

    Default RE: Application level array?

    It should have worked.<BR><BR>How did you declare the array?<BR><BR>Did the application variable *already* contain an array?<BR><BR>Do you want to ever change the array that is in the application variable?<BR><BR>If answer to last two questions is yes, then best way to declare the array is this:<BR><BR>Dim someArray( ) &#039 no size!<BR>ReDim someArray( 10 ) &#039 give it an initial size...<BR>... fill the array ...<BR>Application("name") = someArray<BR><BR>*** in another page ***<BR><BR>theArray = Application("name")<BR>&#039 if you need to change its size:<BR>ReDim Preserve theArray( newSize )<BR>...<BR>Application("name") = theArray<BR><BR>Works for me.<BR><BR>CAUTION: Changing the array should be "wrapped" in Application.Lock/Unlock, of course!<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts