[RESOLVED] Message Box "MsgBox" question
I want to use a MsgBox in my project and have a little problem.I use the picture box in order to calculate the values from the picture that load on it.I want to put a message box so if there no picture loaded on the picturebox should get an apropriate message.
Code
If Picture1.Picture = False Then
MsgBox("Select Picture"), vbOKOnly
End If
The problem is that when i push the button the rest of the program is running and i still calculate the picture values with a loop.How can i change it so if there is no picture loaded and i push the ok button i should be able to start and select a picture (with a button i created on the main menu ) to load.Any ideas???
Re: Message Box "MsgBox" question
VB Code:
Private Sub Command1_Click()
If Picture1.Picture = 0 Then
MsgBox "Select Picture"
Exit Sub 'For Closing the Command button Event
End If
End Sub
Re: Message Box "MsgBox" question
VB Code:
If Picture1.Picture = False Then
MsgBox("Select Picture"), vbOKOnly
Exit Sub '<===== insert this line
End If
Re: Message Box "MsgBox" question