View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default InputBox function - prompt string limit

Marcotte,

I think that what is happening here is that the Inputbox dialog box is a
fixed size, The MsgBox dialog will size to the input, but as inputbox shows
a text input field, it places that in a fixed position, and the dialog box
is fixed around it.

You are not choosing the value 5, you are just inputting the value in the
box. You can just as easily enter 6 which isn't in the list.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Marcotte A" wrote in message
...
Is there a limit on the size of the string you can pass to the prompt arg

of InputBox? For some reason it is not displaying the last line of my menu.
MsgBox works fine.

Dim Answer2 as Variant
Dim HelpMenu As String
HelpMenu = vbCr & "1. Introduction" & vbCr & "2. Summary Pages" _
& vbCr & "3. Store Pages" & vbCr & "4. Adding New Products/Stores"

_
& vbCr & "5. Exit"
MsgBox HelpMenu 'this displays as expected
Answer2 = Application.InputBox(Title:="Menu", prompt:="Enter the number of

a " _
& "menu item below." & HelpMenu)
'this only displays the first 4 lines of HelpMenu. Option 5 doesn't

appear, but I can still choose
'it and the code operates correctly

What am I missing here?