ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Message box macro (https://www.excelbanter.com/excel-discussion-misc-queries/100534-message-box-macro.html)

Heather O'Malley

Message box macro
 
Hello,

Trying to write code that gives me the follwing message box.

Title: Check?
Question:Have you saved and closed all other files?",
Option: yes,no,cancel

but it keeps saying expected:=

code is below:

MsgBox (prompt:="Have you saved and closed all other files?",
buttons:=vbYesNoCancel, title:="Check!")

Any ideas?
Thanks
Heather

FSt1

Message box macro
 
hi,
try this....
MsgBox "Have you saved and closed all other files?", _
vbYesNoCancel, "Check!"

regards
FSt1

"Heather O'Malley" wrote:

Hello,

Trying to write code that gives me the follwing message box.

Title: Check?
Question:Have you saved and closed all other files?",
Option: yes,no,cancel

but it keeps saying expected:=

code is below:

MsgBox (prompt:="Have you saved and closed all other files?",
buttons:=vbYesNoCancel, title:="Check!")

Any ideas?
Thanks
Heather


Harald Staff

Message box macro
 
You asked this 50 minutes ago and received two valid solutions.



Alan

Message box macro
 
Heather,

Just leave the brackets out ...

MsgBox prompt:="Have you saved and closed all other files?",
buttons:=vbYesNoCancel, title:="Check!"



All times are GMT +1. The time now is 05:58 AM.

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