Results 1 to 4 of 4

Thread: repeat code

  1. #1

    Thread Starter
    Member bammoeller's Avatar
    Join Date
    Apr 2006
    Posts
    61

    repeat code

    And Again!
    im going to ask this question to the best of my ability! Hang In there!

    VB Code:
    1. Private Sub Command2_Click()
    2.  If ListView1.SelectedItem.Index < ListView1.ListItems.Count Then
    3.         ListView1.SelectedItem = ListView1.ListItems(ListView1.SelectedItem.Index + 1)
    4.     Else
    5.         ListView1.SelectedItem = ListView1.ListItems(1)
    6.     End If
    7.    
    8.    
    9.     txtSendTo = ListView1.SelectedItem.Text
    10.    
    11.  Call save
    12. End Sub

    i have a scanner that searches for jpeg pictures and when it finds them it saves there location to the ListView box. the code above as you see takes the items found in the search and puts them in the textbox! everytime you click the Command2_Click it goes to the next picture that was found! now what i want it to do is basically repeat itself! the program will do the search after the search i want it to call Command2_Click then it should add the item to the textbox as it does! after that is done i want it to Call save as it does and after it calls save i want it to repeat itself! But the thing is i want it to go to the next listItem the second jpeg picture that is found!
    Thanks
    Make sence?

  2. #2
    Frenzied Member d3gerald's Avatar
    Join Date
    Jan 2006
    Posts
    1,348

    Re: repeat code

    use a loop to achieve what you want
    On error goto Trap

    Trap:
    in case of emergency, drop the case...

    ****************************************
    If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option.
    if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar

  3. #3

    Thread Starter
    Member bammoeller's Avatar
    Join Date
    Apr 2006
    Posts
    61

    Re: repeat code

    with a loop will it call the next image? or will it basically start over and call the first image found? basically ever time you hit command click it loads the next image found! could you please give me an example?

  4. #4

    Thread Starter
    Member bammoeller's Avatar
    Join Date
    Apr 2006
    Posts
    61

    Re: repeat code

    Here is what im working with!
    could you show me what you are talking about and upload it?
    Attached Files Attached Files
    Last edited by bammoeller; Apr 23rd, 2006 at 08:45 PM.

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