MsgBox Syntax

S

scott

I get an error on final "MsgBox =" line. Can someone help with syntax? I
just want an "OK" button with warning sign.

Dim Msg, Style, Title
Style = vbExclamation
Title = "Warning"
Msg = "The Database import table" & _
Chr(13) & "has not been processed." & _
Chr(13) & "" & _
Chr(13) & "Please open Access and import it." & _
Chr(13) & "" & _
Chr(13) & "Then return to Excel and resume export"

MsgBox = (Msg, Style, Title)
 
T

Tom Ogilvy

Dim Msg, Style, Title
Style = vbExclamation
Title = "Warning"
Msg = "The Database import table" & _
Chr(13) & "has not been processed." & _
Chr(13) & "" & _
Chr(13) & "Please open Access and import it." & _
Chr(13) & "" & _
Chr(13) & "Then return to Excel and resume export"

MsgBox Msg, Style, Title
 
S

scott

Thanks again for saving me.


Tom Ogilvy said:
Dim Msg, Style, Title
Style = vbExclamation
Title = "Warning"
Msg = "The Database import table" & _
Chr(13) & "has not been processed." & _
Chr(13) & "" & _
Chr(13) & "Please open Access and import it." & _
Chr(13) & "" & _
Chr(13) & "Then return to Excel and resume export"

MsgBox Msg, Style, Title
 
T

Trevor Shuttleworth

Scott

one way:

Dim sMsg As String, Style, sTitle As String
Style = vbExclamation
sTitle = "Warning"
sMsg = "The Database import table" & _
Chr(13) & "has not been processed." & _
Chr(13) & "" & _
Chr(13) & "Please open Access and import it." & _
Chr(13) & "" & _
Chr(13) & "Then return to Excel and resume export"

MsgBox sMsg, Style, sTitle

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top