Message Box Problems + Excel 2000

Tom59593

New Member
Joined
Jul 2, 2008
Messages
16
Hi there. I am attempting to write a macro that displays the following message (the green text) (I have written it in the exact format that I want):

Your event has been submitted successfully!

Please take a moment to send an email to your administrator informing them of your submission. According to our records, you need to send an email to:

(EMAIL ADDY SPECIFIED IN CELL "R2" OF DATABASE)

Your administrator will review your submission and provide you with any further steps necessary.

THANK YOU!!!

Below I have posted the vb Code that I have thus far, but I keep getting Unexpected seperator errors at random words throughout the message. If someone could repost the code I would need to get this to work properly, that would be extremely helpful.

THANK YOU!!!

I apologize for the having to side-scroll in my code...I thought that it might have had something to do with my message spanning multiple lines in the vb Editor, so this is what I tried....unfortunately this didn't fix it either.
Code:
'Display message box to user confirming submission and requesting email to be sent
MsgBox ("Your event has been submitted successfully!" & vbNewLine & "Please take a moment to send an email to your administrator informing them of your submission. According to our records, you need to send an email to:" _
& vbNewLine & vbNewLine & Worksheets("Database").Range("R2").Value & vbNewLine & vbNewLine "Your administrator will review your submission and provide you with any further steps necessary." _
& vbNewLine & vbNewLine & "THANK YOU!!!")
 
Last edited:

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Why not try constructing the message like this?
Rich (BB code):
Dim strMsg As String
strMsg = "Your event has been submitted successfully!" & vbNewLine
strMsg = strMsg & "Please take a moment to send an email to your administrator informing them of your submission. According to our records, you need to send an email to:"
strMsg = strMsg & vbNewLine & vbNewLine & Worksheets("Database").Range("R2").Value & vbNewLine & vbNewLine
strMsg = strMsg & "Your administrator will review your submission and provide you with any further steps necessary." & vbNewLine & vbNewLine & "THANK YOU!!!"
MsgBox strMsg
By the way the original code is only missing a single &.
Rich (BB code):
...& vbNewLine & "Your administrator ...
 
Last edited:
Upvote 0
haha...wow.

I thought about doing it the other way you proposed, but I had it this way first and I just kept going with it :p

Anyways, thank you for the quick fix...haha.
 
Upvote 0

Forum statistics

Threads
1,215,767
Messages
6,126,773
Members
449,336
Latest member
p17tootie

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top