Results 1 to 3 of 3

Thread: Easy Question - Yet so diffucult for me!! Please help..

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    I have a listbox on my form with a list of 200 or so HTML files. I have another list of 600 images. How can I select the first HTML file in the 1st list, and add 3 images from the 2nd list to it, and then move on to the next HTML file / next 3 images?. Heres an example..

    on all 200 HTML files, they are listed
    test1.html
    test2.html
    test3.html,etc, etc
    On all of the HTML files, there are 3 codes: "IMAGE ONE", "IMAGE TWO" and "IMAGE THREE". What I need the program to do is search for IMAGE ONE, TWO and THREE, and replace that with the 3 images, and move on to the next HTML file. please help me.. ive been stumped all day lol

  2. #2
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    Something like:
    TEST1.html
    -Image1
    -Image2
    -Image3
    TEST2.html
    -Image4
    -Image5
    -Image6
    .....

    Try this:

    Code:
    Private Sub Form_Load()
    For i = 1 To 200
        List1.AddItem "Test" & i & ".html"
    Next i
    End Sub
    
    Private Sub List1_Click()
    Dim ItemNumber As Integer
    
    List2.Clear
    For i = 1 To 3
        ItemNumber = Val(List1.ListIndex) * 3 + i
        List2.AddItem "Image" & ItemNumber
    Next i
    End Sub

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    hmm.. kinda like that.. but I already have all the items in the listbox..

    List1 List2
    test1.html pic1.jpg
    test2.html image1.jpg
    test3.html button.gif
    . thisimage.jpg
    . .
    . .
    test200.html down to 600 images (with different names)


    All i want to do is go to the first item in list1, insert the first 3 graphics from list 2 onto the HTML file itself (done using the replace function), and then move on the the next HTML file and next 3 graphics... anyone know (please tell me u do)

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