Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

msgbox

Status
Not open for further replies.
Jan 23, 2002
1,106
GB
Hi chaps
I'm trying to add a pop up message to a command button.
I have a button which has a sendmail routine in the click event.
I would like this button to also pop up a message which says, thank you, your mail has been sent.
I can't do this :-( I'm realling struggling!
I'm not a programmer but I really need to sort this out. Please can someone help me?
I have the VBA window open and i try to add the following but I get an error message telling me it's expecting an expression.

Msgbox ("Thank you for your email",vbOKCancel,"Your email has been sent",,)

the sendmail routine works just fine by the way!
many thanks
lynne
 
Lynne,

Code:
Msgbox "Thank you for your email",vbOKOnly,"Your email has been sent"


Regards,
Mike
 

MsgBox "Thank you for your email",vbOKOnly,"Your email has been sent
 
try this one instead:
Msgbox ("Thank you for your email. your message has been sent",1+vbinformation, "for your information"

1 is the number of buttons on msgbox (ok)
+ information means the icon showing up on the msgbox
for your information is the title or heading of msgbox.
 
i tried this one, and it works. you can use this one:
MsgBox ("thank you for your email. your email has been sent", vbokonly + icon, "email notification")
 
thanks so much, chaps, but I still get an error.
I think it must be to do with the preceding line of code!

the whole things reads as follows

Private Sub Submit_Click()
ActiveWorkbook.SendMail Recipients:="xxx@yyy.com"
Msgbox ("Thank you for your email. your message has been sent",1+vbinformation, "for your information"
End Sub

it no worky worky, and all the blimmin developers are out on a jolly today :-(
 
Same error; different error? You still have mistaken syntax in the following (open paren):
Code:
Msgbox [b]([/b]"Thank you for your email.  your message has been sent",1+vbinformation, "for your information"


Regards,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top