InputBox character length

dee101

Active Member
Joined
Aug 21, 2004
Messages
282
I have this in a module, and it will does not show Eight Cents on number 4

From Help
The maximum length of prompt is approximately 1024 characters, depending on the width of the characters used.

I put this in word and did a word count and got 347 characters any ideas on why it will not let more characters show?

Thanks



Ans = Application.InputBox("Type in number will format 125.38 like.." & vbCr & _
"(1) = One Hundred Twenty Five Point Three Eight" & vbCr & _
"(2) = One Hundred and Twenty Five Point Three Eight" & vbCr & _
"(3) = One Hundred Twenty Five and 38/100," & vbCr & _
"(4) = One Hundred Twenty Five Dollars and Thirty Eight Cents", "Format For Spelling", 4)
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Instead of Application.Inputbox why not use just InputBox?
 
Upvote 0
Instead of Application.Inputbox why not use just InputBox?

Some calrification: there is a difference between the Inputbox Metho and the InputBox funtion. The Help article which states a prompt length of 1024 characters is for the Inputbox Function, not the InputBox Method. By using the Application object, you get the Inputbox Method, not the function.

The inputbox method does not indicate a limit to the length of the Prompt, but I did some experimenting, and adding a few more characters to your statement generates an internal, non-displaying error Error 2015, which I can't find a definition for at MSDN...

As Norie suggests, use the Function, Not the mthod, and you'll be fine.
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,342
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top