Declaring Arrays

Results 1 to 3 of 3

Thread: Declaring Arrays

  1. #1
    Surfleet Guest

    Default Declaring Arrays

    How do I declare an array to a size held in a variable? The error keeps telling me it is expecting an integer value or constant...

  2. #2
    help files Guest

    Default this may help

    Array Function<BR>Returns a Variant containing an array. <BR><BR>Array(arglist)<BR><BR>The required arglist argument is a comma-delimited list of values that are assigned to the elements of an array contained with the Variant. If no arguments are specified, an array of zero length is created. <BR><BR>Remarks<BR>The notation used to refer to an element of an array consists of the variable name followed by parentheses containing an index number indicating the desired element. In the following example, the first statement creates a variable named A. The second statement assigns an array to variable A. The last statement assigns the value contained in the second array element to another variable. <BR><BR>Dim A<BR>A = Array(10,20,30)<BR>B = A(2) &#039; B is now 30.<BR>Note A variable that is not declared as an array can still contain an array. Although a Variant variable containing an array is conceptually different from an array variable containing Variant elements, the array elements are accessed in the same way.<BR><BR>

  3. #3
    Ghose Guest

    Default RE: Declaring Arrays

    Start the document with:<BR>dim varArray()<BR>then when you have given a integer value to a new variable i.e varSize = 10 then write:<BR>redim varArray(varSize)<BR><BR>this should work...

Posting Permissions

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