ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox Syntax (https://www.excelbanter.com/excel-programming/322600-msgbox-syntax.html)

Scott

MsgBox Syntax
 
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)



Tom Ogilvy

MsgBox Syntax
 
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

--
Regards,
Tom Ogilvy

"scott" wrote in message
...
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)





Scott

MsgBox Syntax
 
Thanks again for saving me.


"Tom Ogilvy" wrote in message
...
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

--
Regards,
Tom Ogilvy

"scott" wrote in message
...
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)







Trevor Shuttleworth

MsgBox Syntax
 
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


"scott" wrote in message
...
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)





All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com