MSGBox Help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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?
 
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.
 
Back
Top