Re: Clearing an Array



You need to dimension the array as a dynamic array vDlt() then you can
use redim to clear the array

eg:

Sub test()
Static vDlt() As Boolean
ReDim vDlt(1 To 52) As Boolean

ReDim vDlt(0) As Boolean
ReDim vDlt(1 To 52) As Boolean
End Sub

.



Relevant Pages

  • RE: Class Property as an Array
    ... ReDim blnArrayAs Boolean ... This example creates a dynamic array, which you seem you be able ... Tim ...
    (microsoft.public.vb.general.discussion)
  • Re: Clearing an Array
    ... I want to clear the contents of an array. ... redimensioning to zero and then re-redimensioning it back to what it ... Static vDltAs Boolean ... ReDim vDltAs Boolean ...
    (microsoft.public.excel)
  • Clearing an Array
    ... I want to clear the contents of an array. ... redimensioning to zero and then re-redimensioning it back to what it ... Static vDltAs Boolean ... ReDim vDltAs Boolean ...
    (microsoft.public.excel)
  • Re: ReDim not working as expected. Array expert needed.
    ... with ReDim, so I commented out the ReDim statement, and ran the procedure to ... Dim MyArray As Variant ' Declare nonarray variant. ... array comes out dimensioned as ... Sub ArrayStudies3 differs from Sub ArrayStudies2 only in that MyArray ...
    (microsoft.public.excel.programming)
  • Re: Sub to extract uniques from 200k data in xl03
    ... The first returns an array of the unique elements of the input array; ... Dim i As Long, p As Object, q As String ... ReDim outputArrayTransposeTo UBound, _ ...
    (microsoft.public.excel.programming)

Loading