View Full Version : Message box problem - code


Walter
01-27-2000, 11:56 AM
Hi I have a message box that pops up on a event. the thing is i cant get it to dislpy right. i want it to display the exclamation box, with only the cancel option or if thats not possible the cacel/retry option
this is what i have for codeL:

msgbox("Prompt,vbexclamation,"Title",
now I've tried everything that I can think of but cant finish off the code correctly if you could help it would be greatly appreciated thanks,
Walter

Walter
01-27-2000, 12:09 PM
Sorry posted in wrong section. My fault

R. Hicks
01-27-2000, 05:07 PM
You coding needs a liitle work. In the event you are working with add this code:

Dim strMsg As String
Dim strTitle As String
Dim intResponse as Integer
strMsg = "Your message here"
strTitle = "Your message box caption here"
intResponse = MsgBox (strMsg, vbExclamation + vbRetryCancel, strTitle)
If intResponse = vbCancel Then
"Code to do something if Cancel selected"
Else 'retry was selected
"Code to do something if Retry selected"
End If

HTH
RDH

[This message has been edited by R. Hicks (edited 01-28-2000).]