Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default 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??

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 275
Default 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??


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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





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
How to input pictures automatically based on cell input? bsharp Excel Worksheet Functions 9 May 30th 09 07:16 AM
input in number form is being multiplied by 1000 when i input. jweinograd Excel Discussion (Misc queries) 4 April 16th 07 11:18 PM
How do I add input data in the input ranges in drop down boxes. oil_driller Excel Discussion (Misc queries) 1 November 9th 05 10:31 PM
=SUMIF(Input!H2:H718,AZ19,Input!E2:E685)AND(IF ALex Excel Worksheet Functions 2 March 14th 05 09:19 PM
CODE to select range based on User Input or Value of Input Field Sandi Gauthier Excel Programming 4 December 8th 03 03:22 PM


All times are GMT +1. The time now is 12:52 PM.

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

About Us

"It's about Microsoft Excel"