Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Change row in a Visual Basic messagebox

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and efficiency...

Thanks
/Stefan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Change row in a Visual Basic messagebox

Stefan,
MsgBox "A long sentence " & vbNewLine & "but in two pieces"

NickHK

"svai" wrote in message
...
Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and

efficiency...

Thanks
/Stefan



  #3   Report Post  
Posted to microsoft.public.excel.programming
ADG ADG is offline
external usenet poster
 
Posts: 76
Default Change row in a Visual Basic messagebox

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and efficiency...

Thanks
/Stefan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Change row in a Visual Basic messagebox

Looks like there are quite a few methods of doing this, because I
always just put vbcrlf.

as in ..."A long sentence " & vbcrlf & "in just two pieces"

Duncan


ADG wrote:

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and efficiency...

Thanks
/Stefan


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Change row in a Visual Basic messagebox

Duncan,
Debug.Print vbNewLine = vbCrLf

NickHK

"Duncan" wrote in message
ups.com...
Looks like there are quite a few methods of doing this, because I
always just put vbcrlf.

as in ..."A long sentence " & vbcrlf & "in just two pieces"

Duncan


ADG wrote:

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box

though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so

instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and

efficiency...

Thanks
/Stefan






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 290
Default Change row in a Visual Basic messagebox

Ok Nick, I see.....

(I am also a beginner though, entitled to follow the slow meandering
path towards enlightenment)

Duncan


NickHK wrote:

Duncan,
Debug.Print vbNewLine = vbCrLf

NickHK

"Duncan" wrote in message
ups.com...
Looks like there are quite a few methods of doing this, because I
always just put vbcrlf.

as in ..."A long sentence " & vbcrlf & "in just two pieces"

Duncan


ADG wrote:

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box

though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so

instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and

efficiency...

Thanks
/Stefan



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Change row in a Visual Basic messagebox

Thanks a bunch everyone! /Stefan

"Duncan" wrote:

Ok Nick, I see.....

(I am also a beginner though, entitled to follow the slow meandering
path towards enlightenment)

Duncan


NickHK wrote:

Duncan,
Debug.Print vbNewLine = vbCrLf

NickHK

"Duncan" wrote in message
ups.com...
Looks like there are quite a few methods of doing this, because I
always just put vbcrlf.

as in ..."A long sentence " & vbcrlf & "in just two pieces"

Duncan


ADG wrote:

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box

though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so

instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and

efficiency...

Thanks
/Stefan



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Change row in a Visual Basic messagebox

the truth of that statement is OS system dependent. vbNewline < vbCrLf on
a MAC for example. vbNewline will always be appropriate for this question.

--
Regards,
Tom Ogilvy


"NickHK" wrote:

Duncan,
Debug.Print vbNewLine = vbCrLf

NickHK

"Duncan" wrote in message
ups.com...
Looks like there are quite a few methods of doing this, because I
always just put vbcrlf.

as in ..."A long sentence " & vbcrlf & "in just two pieces"

Duncan


ADG wrote:

Hi Stefan

Try inserting a line feed (or CrLf this sometimes gives a square box

though)

"A long sentence " & chr(10) & "in just two pieces"

Regards
--
Tony Green


"svai" wrote:

Hi,

How do you change row in a msgbox in Visual Basic?

For instance if you would like to cut a sentence into two rows, so

instead
of the msgbox showing:

"A long sentence in just one piece"

It shows

"A long sentence
but in two pieces"

Might be a bit silly question but in the hunt for pedagogy and

efficiency...

Thanks
/Stefan





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Basic:Change on event [email protected] New Users to Excel 1 December 21st 06 02:37 PM
How do I change a Chart's axis scale from visual basic? jfiorillo Charts and Charting in Excel 2 June 21st 06 08:42 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
change reference for 'visual basic for application' in VBA editor? yoyo2000 Excel Programming 6 September 29th 05 09:59 AM
How do I watch a variable change value during Visual Basic Code e. Stewart1234 Excel Programming 6 December 18th 04 06:53 PM


All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"