Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Visual basic 6 - msgbox query

  1. Aug 2, 2006 #1
    i'm learning a bit of VB at the moment and i wondered if it is possible to change the text of the message box buttons? like if you have a warning boxtriggered by some event, can you make it say something different to 'OK' ?
  2. jcsd
  3. Aug 2, 2006 #2


    User Avatar
    Science Advisor
    Homework Helper

    Yes, but the choices are limited.
    Type a comma after the prompt message.
    It should pop up box with the options.
    Multiple options are selected by typing + after the first option.

    You can also write your own message box.
  4. Aug 3, 2006 #3

    yes, i know you can have things other than ok (maybe i didn't make myself clear) but can you actually write your own text for the buttons? like if you had an 'exit' command button, could you have a message box pop up where you press a button that says 'goodbye' on it to leave the programme?
  5. Aug 3, 2006 #4
    Just make your own, it will probably take you less time. Design a form. Put the required graphics on there, and call it when necessary. Pass whatever string to it, etc...
  6. Aug 3, 2006 #5


    User Avatar
    Science Advisor
    Homework Helper

    Yes, it is possible.
    It is very complex to do so and requires an indepth knowledge of windows o/s.
    Even then, you can't actually change the text until the window is instantiated.

    Much easier to write your own message box screen.
    You can make it look and act just like the built in msgbox and you can make it say anything you want.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Discussions: Visual basic 6 - msgbox query
  1. Fortran / Visual Basic ? (Replies: 13)