Hello,

Bellow is some code from my program. It scrolls through images listed in a listbox.

My problem is this:

Here is a portion of my code:

VB Code:
  1. If frmMain.List1.ListIndex = frmMain.List1.NewIndex Then
  2.  
  3.  
  4. iResponse% = MsgBox("Reached End of List." & vbCrLf & "" & vbCrLf & "Start from top of list?", vbQuestion + vbYesNo, "ClipBoard Monitor")
  5.  If iResponse% = vbYes Then
  6. frmMain.List1.ListIndex = frmMain.List1.TabIndex
  7.  
  8.  
  9.      Dim strImagePath As String
  10.  
  11.      strImagePath = ("C:\Documents and Settings\All Users\Application Data\Clipboard Data\Pictures\" & frmMain.List1.List(frmMain.List1.ListIndex))
  12.  
  13.     Form1.picShowImage.Picture = LoadPicture((strImagePath), , , 0, 0)
  14.     Form1.picShowImage.Picture = LoadPicture(strImagePath)
  15.    
  16.     Form1.picShowImage.Move 0, 0
  17.     Form1.picShowImage.Visible = True
  18.     OnImageLoad
  19.    
  20.  
  21. Else
  22.  
  23. Exit Sub
  24.  
  25. 'This portion does not work because it doesn't allow 2 [B]if[/B]'s
  26. Else
  27. frmMain.List1.ListIndex = frmMain.List1.ListIndex +1

Now as you see there are 2 "IF" statements in this code. My question is how do I put 2 "Else" functions in this code?

If I put 2 Else I get the error Else without IF.

Thank you for any help!
P.S. If you need more info just let me know!
Stilekid007