Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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?? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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?? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to input pictures automatically based on cell input? | Excel Worksheet Functions | |||
input in number form is being multiplied by 1000 when i input. | Excel Discussion (Misc queries) | |||
How do I add input data in the input ranges in drop down boxes. | Excel Discussion (Misc queries) | |||
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF | Excel Worksheet Functions | |||
CODE to select range based on User Input or Value of Input Field | Excel Programming |