+ Reply to Thread
Results 1 to 5 of 5

MsgBox - 1) custom text in title bar? - 2) icon change?

  1. #1
    StargateFanFromWork
    Guest

    MsgBox - 1) custom text in title bar? - 2) icon change?

    The syntax for Excel for the msgbox is quite similar to
    AutoIt's (a freeware scripting program). When I create
    message boxes in AutoIt, I can put a "title" or header
    info in the title bar of the box.

    I've searched various pages on the net looking for syntax
    similar to this but for Excel but I haven't seen anything
    that shows if this is even possible. If it can be done,
    what would the syntax be, pls?

    My line of coding looks like this currently:

    MsgBox "Getting ready to print ... please insert a pink
    sheet of paper into the printer."

    I'd like to put the "Getting ready to print ..." in the
    title bar if possible.

    Also, while doing the abovementioned searching, I did find
    a neat piece of code that adds a red circle with an X
    through it and this "icon" is added through
    the "vbcritical" coding at end of the revised line here:

    MsgBox "Getting ready to print ... please insert a pink
    sheet of paper into the printer.", vbCritical

    I'm thinking the one with a yellow triangle "caution" sign
    with an exclamation point would be better for this. Is
    this possible; and if so, does anyone know the syntax for
    it?

    Thanks so much! As always, this is for the benefit of
    many people. Cheers. :oD

  2. #2
    JE McGimpsey
    Guest

    Re: MsgBox - 1) custom text in title bar? - 2) icon change?

    Check out "MsgBox Function" in XL/VBA Help...


    In article <[email protected]>,
    "StargateFanFromWork" <[email protected]> wrote:

    > does anyone know the syntax for it?


  3. #3
    Bob Phillips
    Guest

    Re: MsgBox - 1) custom text in title bar? - 2) icon change?

    MsgBox "Getting ready to print ... please insert a pink sheet of paper into
    the printer.", _
    vbexclamation,"Getting ready to print ..."



    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "StargateFanFromWork" <[email protected]> wrote in message
    news:[email protected]...
    > The syntax for Excel for the msgbox is quite similar to
    > AutoIt's (a freeware scripting program). When I create
    > message boxes in AutoIt, I can put a "title" or header
    > info in the title bar of the box.
    >
    > I've searched various pages on the net looking for syntax
    > similar to this but for Excel but I haven't seen anything
    > that shows if this is even possible. If it can be done,
    > what would the syntax be, pls?
    >
    > My line of coding looks like this currently:
    >
    > MsgBox "Getting ready to print ... please insert a pink
    > sheet of paper into the printer."
    >
    > I'd like to put the "Getting ready to print ..." in the
    > title bar if possible.
    >
    > Also, while doing the abovementioned searching, I did find
    > a neat piece of code that adds a red circle with an X
    > through it and this "icon" is added through
    > the "vbcritical" coding at end of the revised line here:
    >
    > MsgBox "Getting ready to print ... please insert a pink
    > sheet of paper into the printer.", vbCritical
    >
    > I'm thinking the one with a yellow triangle "caution" sign
    > with an exclamation point would be better for this. Is
    > this possible; and if so, does anyone know the syntax for
    > it?
    >
    > Thanks so much! As always, this is for the benefit of
    > many people. Cheers. :oD




  4. #4
    Guest

    Re: MsgBox - 1) custom text in title bar? - 2) icon change?

    Totally awesome! The vbexclamation put the right icon in!
    <g>

    Here is how the macro stands now:

    ************************
    Sub Auto_Open()

    Dim vResponse As Variant
    Do
    vResponse = Application.InputBox( _
    Prompt:="Enter pay period start date
    (in dd/mm/yyyy format):", _
    Title:="Start Date", _
    Default:=Format(Date, "dd/mm/yyyy"), _
    Type:=2)
    If vResponse = False Then Exit Sub 'User cancelled
    Loop Until IsDate(vResponse)
    Range("B8").Value = CDate(vResponse)

    MsgBox "Please insert a pink sheet of paper into the
    printer. Once you've done that, click ''OK''.",
    vbExclamation, "Getting ready to print ..."

    Application.Dialogs(xlDialogPrint).Show

    End Sub
    ************************

    What this does is makes this time sheet spreadsheet so
    easy to use. The user is asked for only one piece of
    input, the start date for the 2-week pay period. That
    dump populates 16 other dependent cells and then sends the
    sheet to the printer after prompting user to insert the
    right colour of paper (and PAY is _adamant_ that we follow
    the rules down to the letter even down to the colour of
    paper <lol>!).

    Thanks much everyone. I'm getting better and better at
    all this but still need help occasionally. But for
    everything item I've asked, I've probably done a gazillion
    things on my own. <g>

    [snip]

    >> I'd like to put the "Getting ready to print ..." in the
    >> title bar if possible.


    [snip]

    >> I'm thinking the one with a yellow triangle "caution"

    sign
    >> with an exclamation point would be better for this. Is
    >> this possible; and if so, does anyone know the syntax

    for
    >> it?


    [snip]


  5. #5
    StargateFanFromWork
    Guest

    Re: MsgBox - 1) custom text in title bar? - 2) icon change?

    Ah, geez! No wonder I never got anything. I was using
    the Help of Excel. Of course, one should be in the VB
    editor's help. D'uh!

    And it's easier than the yellow syntax box coding that was
    coming up when I was typing in the msgbox code. That
    yellow box with the syntax was in the way and I all my
    trials didn't work. I guess it's because there are
    actually not supposed to be any broken brackets <lol>.
    The vbexclamation example given in another message in this
    thread doesn't have them at all, so that must be why my
    title attempt never worked <g>.

    Thanks, I may not have saved the wasted search time today,
    but in future I'll not have so many dead-ends! <g>

    >-----Original Message-----
    >Check out "MsgBox Function" in XL/VBA Help...
    >
    >
    >In article <[email protected]>,
    > "StargateFanFromWork"

    <[email protected]> wrote:
    >
    >> does anyone know the syntax for it?

    >.


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1