Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Can the InputBox Prompt have Carriage Returns?

I am creating an InputBox and I have 8 options a person may select from.

I would like my InputBox to display the choices in a list form, but I cannot
figure out how to enter carriage returns.

Right now the input box has one statement that looks like this:

Enter the number of the type of work to be performed 1. Excavation 2.
Excavation/Footings 3. Sewer 4. Sewer/Water 5. Water 6. Storm 7.
Irrigation 8. Electric

I want it to look like this:

Enter the number of the type of work to be performed

1. Excavation
2. Excavation/Footings
3. Sewer
4. Sewer/Water
5. Water
6. Storm
7. Irrigation
8. Electric

I have placed (Chr(13)) before each number in the list, but the VB editing
box returns an error when I try to move off the coding line.

Do you have any help for me on this one? I thank you in advance.

Tofer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Can the InputBox Prompt have Carriage Returns?

ans = InputBox("Enter the number of the type of work to be performed" &
vbNewLine & vbNewLine & _
"1. Excavation" & vbNewLine & _
"2. Excavation/Footings" & vbNewLine & _
"3. Sewer" & vbNewLine & _
"4. Sewer/Water" & vbNewLine & _
"5. Water" & vbNewLine & _
"6. Storm" & vbNewLine & _
"7. Irrigation" & vbNewLine & _
"8. Electric")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ToferKing" wrote in message
...
I am creating an InputBox and I have 8 options a person may select from.

I would like my InputBox to display the choices in a list form, but I

cannot
figure out how to enter carriage returns.

Right now the input box has one statement that looks like this:

Enter the number of the type of work to be performed 1. Excavation 2.
Excavation/Footings 3. Sewer 4. Sewer/Water 5. Water 6. Storm 7.
Irrigation 8. Electric

I want it to look like this:

Enter the number of the type of work to be performed

1. Excavation
2. Excavation/Footings
3. Sewer
4. Sewer/Water
5. Water
6. Storm
7. Irrigation
8. Electric

I have placed (Chr(13)) before each number in the list, but the VB editing
box returns an error when I try to move off the coding line.

Do you have any help for me on this one? I thank you in advance.

Tofer



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Can the InputBox Prompt have Carriage Returns?

Note that this code

ans = InputBox("Enter the number of the type of work to be performed" &
vbNewLine & vbNewLine & _

should all be on one line.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Bob Phillips" wrote in message
...
ans = InputBox("Enter the number of the type of work to be performed" &
vbNewLine & vbNewLine & _
"1. Excavation" & vbNewLine & _
"2. Excavation/Footings" & vbNewLine & _
"3. Sewer" & vbNewLine & _
"4. Sewer/Water" & vbNewLine & _
"5. Water" & vbNewLine & _
"6. Storm" & vbNewLine & _
"7. Irrigation" & vbNewLine & _
"8. Electric")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ToferKing" wrote in message
...
I am creating an InputBox and I have 8 options a person may select from.

I would like my InputBox to display the choices in a list form, but I

cannot
figure out how to enter carriage returns.

Right now the input box has one statement that looks like this:

Enter the number of the type of work to be performed 1. Excavation 2.
Excavation/Footings 3. Sewer 4. Sewer/Water 5. Water 6. Storm 7.
Irrigation 8. Electric

I want it to look like this:

Enter the number of the type of work to be performed

1. Excavation
2. Excavation/Footings
3. Sewer
4. Sewer/Water
5. Water
6. Storm
7. Irrigation
8. Electric

I have placed (Chr(13)) before each number in the list, but the VB

editing
box returns an error when I try to move off the coding line.

Do you have any help for me on this one? I thank you in advance.

Tofer





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default Can the InputBox Prompt have Carriage Returns?

Bob, It works like a champ!
Thanks so much for your help.

Tofer

"Bob Phillips" wrote:

ans = InputBox("Enter the number of the type of work to be performed" &
vbNewLine & vbNewLine & _
"1. Excavation" & vbNewLine & _
"2. Excavation/Footings" & vbNewLine & _
"3. Sewer" & vbNewLine & _
"4. Sewer/Water" & vbNewLine & _
"5. Water" & vbNewLine & _
"6. Storm" & vbNewLine & _
"7. Irrigation" & vbNewLine & _
"8. Electric")


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ToferKing" wrote in message
...
I am creating an InputBox and I have 8 options a person may select from.

I would like my InputBox to display the choices in a list form, but I

cannot
figure out how to enter carriage returns.

Right now the input box has one statement that looks like this:

Enter the number of the type of work to be performed 1. Excavation 2.
Excavation/Footings 3. Sewer 4. Sewer/Water 5. Water 6. Storm 7.
Irrigation 8. Electric

I want it to look like this:

Enter the number of the type of work to be performed

1. Excavation
2. Excavation/Footings
3. Sewer
4. Sewer/Water
5. Water
6. Storm
7. Irrigation
8. Electric

I have placed (Chr(13)) before each number in the list, but the VB editing
box returns an error when I try to move off the coding line.

Do you have any help for me on this one? I thank you in advance.

Tofer




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
Carriage returns - how to get rid of them (again) Andrewsan Excel Discussion (Misc queries) 8 March 28th 07 10:15 AM
Carriage returns in the formula bar? rubeus Excel Worksheet Functions 4 July 6th 06 06:05 PM
VBA: Concatenate with carriage returns Rob Excel Programming 2 October 4th 05 01:41 PM
Carriage returns tracyt620 Excel Discussion (Misc queries) 1 July 7th 05 02:52 PM
Replacing Carriage Returns David Excel Programming 1 November 26th 03 04:01 PM


All times are GMT +1. The time now is 07:23 AM.

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"