Results 1 to 3 of 3

Thread: [RESOLVED] Set one array = to another?

  1. #1

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Resolved [RESOLVED] Set one array = to another?

    I must be tired!! why cant I do this:


    DIm Array1() as string
    Dim Array2() as string

    Array1 = Split(StuffFromFile,"vbcrlf)

    Array2 = Array1 ???

    how do I set 1 array = another?
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

  2. #2
    Fanatic Member space_monkey's Avatar
    Join Date
    Apr 2005
    Location
    神と歩くこと
    Posts
    573

    Re: Set one array = to another?

    Hey,
    This worked for me:

    VB Code:
    1. Private Sub Command1_Click()
    2. Dim Array1() As String
    3. Dim Array2() As String
    4. Dim strStuff As String
    5.  
    6. strStuff = "bob" & vbCrLf & "Larry" & vbCrLf & "Moe"
    7. Array1() = Split(strStuff, vbCrLf)
    8.  
    9. Array2() = Array1()
    10.  
    11.  
    12. End Sub
    Using VB6 or VB.net 2008 with .net 3.5
    "Life... death... either way I'll be confined to a small cubicle!" - Hermes Conrad

  3. #3

    Thread Starter
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390

    Re: Set one array = to another?

    LOL!! omg!
    it was not the A = B that was my issue.. it was my function checcking if the array was loaded!! oops
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

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