|
-
Oct 26th, 2006, 06:09 AM
#1
Thread Starter
Hyperactive Member
[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???
-
Oct 26th, 2006, 06:16 AM
#2
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
Last edited by shakti5385; Oct 26th, 2006 at 08:21 AM.
-
Oct 26th, 2006, 07:26 AM
#3
Re: Message Box "MsgBox" question
VB Code:
If Picture1.Picture = False Then
MsgBox("Select Picture"), vbOKOnly
Exit Sub '<===== insert this line
End If
-
Oct 27th, 2006, 02:05 AM
#4
Thread Starter
Hyperactive Member
Re: Message Box "MsgBox" question
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|