MSGBox Help

W

WT

Could someone please tell me what needs to replace the «type» field in the
following example?

=IIf([DeliveryorPickup]=1,"Customer Pick
Up",IIf([DeliveryorPickup]=2,"Delivered",MsgBox ("Please select a Delivery
Option", «type», "Input Required")))

Is this the best way to do this, or is there a more elegant way to achieve
this?
 
D

Douglas J. Steele

What are you trying to do? What you put where you've indicated <<type>>
changes what icon is displayed on the message box, what buttons are shown on
the message box and which button (when there's more than one) is highlighted
as the default.

Assuming that you want the "error" icon on your message box, and only want
an OK button, use

vbCritical + vbOkOnly

As to whether there's a better approach, it's virtually impossible to say
without knowing more about where this code is being used.
 

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

Top