Re: array size

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



[Ignore previous post..]

> "dim arr()"
> to have dynamic aray, and after sometimes
> "redim arr(some_size)"
> but then, to check the current size with
> "ubound(arr)"
> gives error if arr is not yet "redimed"
>
> is it possible to check for empty array [no one element] *without* having to
> catch errors?
> [and without auxilary variable to hold "not-yet-redim"]

Try this:
http://groups.google.co.uk/group/microsoft.public.vb.general.discussion/msg/946e66e23a0010f5
Hope this helps,

Mike


- Microsoft Visual Basic MVP -
E-Mail: EDais@xxxxxxxx
WWW: Http://EDais.mvps.org/


.



Relevant Pages

  • Re: dhSQLite question/problem
    ... Dim rngSizedToArray as Excel.Range ... So why is it that " using 'arr' for storage of this array does help ", ... Dim arr as Variant ... dump strArr to cells and the 'any length exceeds 913 errors' ...
    (microsoft.public.vb.general.discussion)
  • RE: Importing Text Files of 100,000+ lines, many blanks
    ... Dim txtarray() ... ReDim txtarray ... arr = arr + 1 ... tested this by opening the file in Wordpad, saving it, opening it in Notepad, ...
    (microsoft.public.excel.programming)
  • Re: Why Compile error on Myarr()?
    ... you cannot assign to an array. ... 'I wouldn't use Arr() here. ... 'Dim Arr() As Variant ...
    (microsoft.public.excel.programming)
  • Re: Why Compile error on Myarr()?
    ... 'I wouldn't use Arr() here. ... 'Dim Arr() As Variant ... End Sub ...
    (microsoft.public.excel.programming)
  • Re: Populate a multi-dimensional array from Ranges
    ... I added the following to code to output the values of multiArr to G1:I10. ... Dim i As Long ... Dim arr ... You can assign values in a single area range to an array in one go like ...
    (microsoft.public.excel.programming)