![]() |
i = input box - help
I have this code to produce a msg box
i = InputBox("Please enter the date you are looking for eg 10 October 2005") I want the "Please enter the date you are looking for" part of it shown on 1 line of the msg box, a blank line then eg 10 October 2005") on the 3rd. How do you change the code to force text onto different lines?? Thanks |
i = input box - help
One way:
i = InputBox( _ Prompt:="Please enter the date you are looking for" & _ vbNewLine & vbNewLine & "e.g., " & _ Format(Date, "dd mmmm yyyy")) or, if you wanted to have a default entry instead: i = InputBox( _ Prompt:="Please enter the date you are looking for" & _ vbNewLine & vbNewLine, _ Default:=Format(Date, "dd mmm yyyy")) In article , "Anthony" wrote: I have this code to produce a msg box i = InputBox("Please enter the date you are looking for eg 10 October 2005") I want the "Please enter the date you are looking for" part of it shown on 1 line of the msg box, a blank line then eg 10 October 2005") on the 3rd. How do you change the code to force text onto different lines?? |
i = input box - help
"Anthony" wrote in message ... I have this code to produce a msg box i = InputBox("Please enter the date you are looking for eg 10 October 2005") I want the "Please enter the date you are looking for" part of it shown on 1 line of the msg box, a blank line then eg 10 October 2005") on the 3rd. How do you change the code to force text onto different lines?? Thanks Split your text with a Linefeed (vbLf): E.G. "Please enter the date you are looking for" & vbLf & vbLf & "eg 10 October 2005" Peter |
i = input box - help
i= InputBox ("Please enter the date you are looking for" & _
vbNewLine & vbNewLine & "eg 10 October 2005") -- HTH Bob Phillips "Anthony" wrote in message ... I have this code to produce a msg box i = InputBox("Please enter the date you are looking for eg 10 October 2005") I want the "Please enter the date you are looking for" part of it shown on 1 line of the msg box, a blank line then eg 10 October 2005") on the 3rd. How do you change the code to force text onto different lines?? Thanks |
i = input box - help
Good - thats done the trick -thanks
"JE McGimpsey" wrote: One way: i = InputBox( _ Prompt:="Please enter the date you are looking for" & _ vbNewLine & vbNewLine & "e.g., " & _ Format(Date, "dd mmmm yyyy")) or, if you wanted to have a default entry instead: i = InputBox( _ Prompt:="Please enter the date you are looking for" & _ vbNewLine & vbNewLine, _ Default:=Format(Date, "dd mmm yyyy")) In article , "Anthony" wrote: I have this code to produce a msg box i = InputBox("Please enter the date you are looking for eg 10 October 2005") I want the "Please enter the date you are looking for" part of it shown on 1 line of the msg box, a blank line then eg 10 October 2005") on the 3rd. How do you change the code to force text onto different lines?? |
All times are GMT +1. The time now is 02:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com