Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Mar 2009
    Location
    Somewhere Over the Rainbow
    Posts
    232
    Thanks
    0
    Thanked 1 Time in 1 Post
    Hello,

    I am tying to create a custom msgbox or error message using .vbs using the code below as an example.

    x= msgbox ("Hello World", 4+46, "Greetings Message")

    1) I know the "4+46" determines the messages settings, such as icons, sounds, and buttons options. Is there a website that shows a preview image of each of these settings, so that I can browse which one I want to use without having to try every combination?

    2) I am also trying to make a message that has a button that opens a program of my choice. Can this be done, if so how?

    Thanks a lot.
    Time can fix anything.....even a broken clock. - Handy Andy

  2. #2
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    1) While in the VBE, bring up the Help and do a search on "msgbox constants" While it doesn't have a preview, it will let you know what the possibilities are.
    2) For this to be truly customizable you would need to use a User Form or you could assign the action to the msgbox response. Something like this:
    Code:
    Sub msg()
    Dim resp As Variant
    resp = MsgBox("Do you want to launch IE?", vbYesNo)
    If resp = vbYes Then
        'insert code here
        MsgBox "Launching"
    Else
        MsgBox "Have a nice day"
    End If
    End Sub

  3. #3
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #4
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post
    This site should provide the info you want.
    Regards
    Don

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •