InputBox character length

dee101

Active Member
Joined
Aug 21, 2004
Messages
270
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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,300
Office Version
  1. 365
Platform
  1. Windows
Instead of Application.Inputbox why not use just InputBox?
 

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
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.
 

Forum statistics

Threads
1,137,300
Messages
5,680,699
Members
419,928
Latest member
dolincasting

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
Top