View Single Post
  #14   Report Post  
Posted to microsoft.public.excel.programming
David F. Schrader David F. Schrader is offline
external usenet poster
 
Posts: 13
Default Resize Message Box

Remember that providing messages to the user is an
art which must be handled carefully. Everything must
go through one of the "media" sensory systems you
have available. Right now you are targeting visual
messaging.

If you must present a great deal of information then
creating your own "form" and displaying it is probably
the best way to go. If you have only a limited amount
to display using the built-in "MsgBox" capability is
easier than re-inventing Rome.

If you are really "big" into using the "Msgbox" you
can use a lot of the "built-in" Microsoft "goodies"
to make the "window" look pretty. For example:
you can use the "vbTab" and the "vbCrLf" to add
both vertical and horizontal spacing.

Yes, the size *is* controlled by the size of the user's
screen so you really need to plan for the screen of
user with *smallest* monitor not the largest. The
best thing is to remember the KISS principle when
using MsgBox - "Keep It Simple (Stupid)", That
way the message shouldn't over-flow the screen
display.

David

"Andibevan" wrote in message
...
Thanks Tom - I will have a play around with your suggestion and see how

far
I get.

"Tom Ogilvy" wrote in message
...
Generally, you insert a userform and put a label on it. Make it as

wide
as you need. then you show the form

userform1.show

in the initialize event you could do

Private sub Userform_Initialize()
label1.caption = _
"Copy Information from:- C:\Documents and Settings\abevan\My" & _
"Documents\SM Partition\Drive_H\WIP\WIP - Weekly Checkin\Start"
End sub

back to the message box, you could try:

Sub showmsg()
sStr = "Copy Information from:"
sStr1 = "C:\Documents and Settings\abevan\My" & _
"Documents\SM Partition\Drive_H\WIP\WIP - Weekly Checkin\Start"
MsgBox sStr & vbNewLine & sStr1

End Sub

That might work for you



--
Regards,
Tom Ogilvy

"Andibevan" wrote in

message
...
Tom,

You may well be right - I seem to remember that you can generate a

line
of
code to generate a userform - am I correct or imagining things?

Ta

Andy

"Tom Ogilvy" wrote in message
...
I believe it can be resized using the windows API, but code I have

seen
to
customize a message box is voluminous - easier to use a userform I

would
think.

--
Regards,
Tom Ogilvy


"Andibevan" wrote in
message
...
Hi All,

I am trying to display a large amount of information to the user

within
a
message box but can't work out how to specify the width of the

box.

As the width of the box is too small, my text word wraps whereas I

want
each
piece of information to be contained on a seperate line.

Is it possible to set the size of a message box or do I need to

use
a
useform.

Would really appreciate it if someone could give me a pointer.

Thanks

Andy