Subscript out of range

Discussion in 'Software' started by ceal21c, Jun 1, 2006.

  1. ceal21c

    ceal21c Private E-2

    Hey Guys,

    I have an array declared and not initialized as:
    Public UserListArray() As String.

    Along the coding line I have need to delete portions of this array using this code:

    For i = icboUserList to UserListSize - 1
    UserListArray(i) = UserListArray(i+3)
    Next i

    But I receive an error, Run-time error '9': Subscript out of range. Does this make sense to anyone and how can I correct it?
     
  2. ceal21c

    ceal21c Private E-2

    Found that using LBound and UBound helped to determine the lower and upper parameters of my array which prohibited me from overstepping my array boundaries.

    LBound(UserListArray)
    UBound(UserListArray)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds