"MSGBOX" doesn't work any more.

Mackeral

Board Regular
Joined
Mar 7, 2015
Messages
249
Office Version
  1. 365
Platform
  1. Windows
On my computer, "MSGBOX" has stopped working.

If I call it with one argument, it works correctly.

However, when I call it with 2 arguments it gives an error message. And that should work according to the instructions I find on the Internet.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
What does your code look like, and what is the error message being displayed?
 
Upvote 0
In the documentation as I read it implies that the arguments are optional.
But in fact they are NOT optional: the second argument, for instance, has to be a number corresponding to one of the "Msgbox Arguments".
The third argument is a string to be used as the Msgbox title.
And so on as per the Msgbox documentation
 
Upvote 0
It does not 'imply' that at all. It expressly states what is required and what is optional.
I don't know what "the MsgBox documenation" is that you're referring to, but here is the actual documenation: MsgBox function (Visual Basic for Applications)

The first argument - prompt - is required.
The second argument - buttons - is optional. It even states that "If omitted, the default value for buttons is 0."
 
Upvote 0
If I call it with one argument, it works correctly
Given that statement, the other arguments clearly are optional. (I've unmarked your answer by the way as it is not correct)

You haven't really provided any information, but I would guess that you either tried to enclose multiple arguments in brackets without storing the result, or you passed them in the wrong order without using named arguments.
 
Upvote 0

Forum statistics

Threads
1,224,054
Messages
6,176,107
Members
452,707
Latest member
Cruzito

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