Ubound on Dynamic Array

Results 1 to 2 of 2

Thread: Ubound on Dynamic Array

  1. #1
    John D Guest

    Default Ubound on Dynamic Array

    I want to check if a Dynamic Array has been "Redim"ed yet. If I:<BR> Dim MyDynamicArray()<BR> Response.Write Ubound(MyDynamicArray) <BR>I get an error unless I first:<BR> Redim Preserve MyDynamicArray(1,1)<BR><BR>Is there another way to detect if it&#039;s been "Redim"ed? <BR><BR>Thanks<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Ubound on Dynamic Array

    Well, just do this:<BR><BR>Dim MyDynamicArray<BR><BR>If IsArray(MyDynamicArray) Then<BR> &#039;tis been redimmed

Posting Permissions

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