Results 1 to 2 of 2

Thread: adding data to a array

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2000
    Location
    staffs
    Posts
    2

    Post

    i'm stuck on a project, i have been asked to create a cd browser in vb6, it has to use an array, i need to add the cd title and artiste, i'm having trouble adding new records. if u could help me that would great

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    To add new Elements to an Array, Dim the Array as Dynamic and then use the ReDim Statement with the Preserve Keyword, ie.
    Code:
    Dim aArray() As String
    ReDim aArray(0)
    aArray(0) = "Item 1"
    ReDim Preserve aArray(1)
    aArray(1) = "Item 2"
    'Etc..
    ------------------
    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]


Posting Permissions

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



Click Here to Expand Forum to Full Width