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:
If frmMain.List1.ListIndex = frmMain.List1.NewIndex Then iResponse% = MsgBox("Reached End of List." & vbCrLf & "" & vbCrLf & "Start from top of list?", vbQuestion + vbYesNo, "ClipBoard Monitor") If iResponse% = vbYes Then frmMain.List1.ListIndex = frmMain.List1.TabIndex Dim strImagePath As String strImagePath = ("C:\Documents and Settings\All Users\Application Data\Clipboard Data\Pictures\" & frmMain.List1.List(frmMain.List1.ListIndex)) Form1.picShowImage.Picture = LoadPicture((strImagePath), , , 0, 0) Form1.picShowImage.Picture = LoadPicture(strImagePath) Form1.picShowImage.Move 0, 0 Form1.picShowImage.Visible = True OnImageLoad Else Exit Sub 'This portion does not work because it doesn't allow 2 [B]if[/B]'s Else 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




Reply With Quote