|
-
Feb 17th, 2006, 03:41 PM
#1
Thread Starter
Lively Member
[RESOLVED] msgbox
hi,
When I call a msgbox like this
how do an if command for yes and no ?
bye
-
Feb 17th, 2006, 03:45 PM
#2
Re: msgbox
VB Code:
dim intRes as integer
intRes = MsgBox("Exit",vbYesNo)
if intRes = vbYes then
Exit code here
end if
or
VB Code:
if msgbox("Exit",vbYesNo) = vbYes then
Exit code here
end if
Sometimes the Programmer
Sometimes the DBA
Mazz1
-
Feb 17th, 2006, 03:48 PM
#3
Re: msgbox
VB Code:
If MsgBox("Exit", vbYesNo) = vbYes Then
Else
End If
'or
Dim mBoxsResult As VbMsgBoxResult
mBoxsResult = MsgBox("Exit", vbYesNo)
Select Case mBoxsResult
Case vbYes
Case vbNo
End Select
-
Feb 17th, 2006, 03:49 PM
#4
Thread Starter
Lively Member
-
Feb 17th, 2006, 03:55 PM
#5
Re: [RESOLVED] msgbox
If you wanted to put one of the little pictures on the messagebox you could do it like this...
VB Code:
If MsgBox("Would you like to exit?", vbQuestion + vbYesNo) = vbYes Then
Unload Me 'They clicked Yes
End If
This would but the little question picture on it....theres several available when your typing the code it should show up with the list of available pics.
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
|