PC Review


Reply
Thread Tools Rate Thread

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

 
 
StargateFanFromWork
Guest
Posts: n/a
 
      5th May 2005
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. D
 
Reply With Quote
 
 
 
 
JE McGimpsey
Guest
Posts: n/a
 
      5th May 2005
Check out "MsgBox Function" in XL/VBA Help...


In article <01bb01c5518c$9c24b5d0$(E-Mail Removed)>,
"StargateFanFromWork" <(E-Mail Removed)> wrote:

> does anyone know the syntax for it?

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      5th May 2005
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" <(E-Mail Removed)> wrote in message
news:01bb01c5518c$9c24b5d0$(E-Mail Removed)...
> 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. D



 
Reply With Quote
 
Guest
Posts: n/a
 
      5th May 2005
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]

 
Reply With Quote
 
StargateFanFromWork
Guest
Posts: n/a
 
      5th May 2005
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 <01bb01c5518c$9c24b5d0$(E-Mail Removed)>,
> "StargateFanFromWork"

<(E-Mail Removed)> wrote:
>
>> does anyone know the syntax for it?

>.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change the MsgBox Title magicdds- Microsoft Access Form Coding 2 18th Apr 2008 07:57 AM
Text in Title bar of msgbox Dave Microsoft Access Forms 10 9th Mar 2008 01:50 AM
RE: Change the default Microsoft PowerPoint text in MsgBox title b David M. Marcovitz Microsoft Powerpoint 0 5th Dec 2006 09:26 PM
Re: Change the default Microsoft PowerPoint text in MsgBox title bars. David M. Marcovitz Microsoft Powerpoint 0 5th Dec 2006 08:45 PM
change title bar of msgbox alex Microsoft Access VBA Modules 3 23rd Jan 2004 02:09 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:48 AM.