problem with length of input into an InputBox:

bk

Active Member
Joined
Jun 2, 2002
Messages
387
Instructions are being entered into an InputBox and placed in a cell for later use.

I thought about merging the cells and having the text autofit, but I got into that "how-many-words-will-fit-on-the-top-of-a-pin" phenomenon.

There should be ways to count the number of characters that are entered into the Input Box, aren't there?

I just don't know the exact commands or syntax (and I've mentioned this before, but in case someone thinks I'm just being lazy, I don't have VB help installed on my machine and I've been unable to get it installed).

Any help will be greatly appreciated. I'm open to VB code or non-code solutions.

Thanks.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
you can but =LEN(d1) and it will count the number of characters in cell d1.

Ive done that to show show if there are the max characters in a cell and to go to the next cell when they open the input box again.
 
Upvote 0
What exactly is the scenario?

InputBox appears, and asks user to input what?

User responds by entering a correct entry, which is what?

Or an incorrect entry, which is simply too long?

The "too many characters" is all about the user's entry, correct?

You may be having trouble with users pasting into the InputBox, Control characters may be giving you trouble.

The recipient Cell will need to be formatted as General, it seems Text won't work as well.

I would suggest a UserForm with TextBox, and even that won't get you out of the woods with the subtle stuff.

For instance, a TextBox will allow NewLine entry (Control-Enter), but when that TextBox.Value gets assigned to a Cell, you will see little boxes at the end of lines.

If you use Clean(), you lose all NewLines, and end up with one long string.

Just now playing around with this issue, seems that the 'little boxes' can be manually removed, without losing the NewLine.

Which means to me that if you know the ASCII value, they can be removed.
This message was edited by stevebausch on 2002-08-23 08:09
 
Upvote 0
Thanks, dbrull.

That command seems to give me the info I needed to work some kind of check out. I figured it would be simple, if I just knew the command.

Thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,487
Members
448,967
Latest member
visheshkotha

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