msgBox Text Truncating

C

cincode5

Hello out there...

Hope there is a solid reason for this happening, because I cant figure it out.

I have a spreadsheet with a 'msgBox' that I want to use for an "About This Program" message. There are approximately 30 lines of text written into the Sub , but only 18 lines display when the control button is pressed. The rest are truncated. I'm about as much a novice to VB as one can get, so can someone clarify why this might be happening, advise on what I'm doing wrong, and how can I get all the lines of text to display.
 
P

papou

Hello
It seems there definitely is a limit to the number of caracters to be
displayed in a message box, I have myself discovered this limit some time
ago.
The only way to display your text is to build a userform instead of using a
message box.
HTH

Cordially
Pascal

cincode5 said:
Hello out there...

Hope there is a solid reason for this happening, because I cant figure it out.

I have a spreadsheet with a 'msgBox' that I want to use for an "About This
Program" message. There are approximately 30 lines of text written into the
Sub , but only 18 lines display when the control button is pressed. The
rest are truncated. I'm about as much a novice to VB as one can get, so can
someone clarify why this might be happening, advise on what I'm doing wrong,
and how can I get all the lines of text to display.
 
J

JE McGimpsey

From XL Help (MsgBox Function):
prompt Required. String expression displayed as the message in the dialog
box. The maximum length of prompt is approximately 1024 characters, depending
on the width of the characters used.

Seems likely you're running up against the 1024 character limit.

The fix would be to use a Userform instead.
 
Top