Max numbers of characters in userform textbox and cell

  • Thread starter Thread starter N E Body
  • Start date Start date
N

N E Body

Hi

Is there a limit to the number of characters allowed in a cell (or is it
just a limit to the size of a formula)

I have a userform which has a textbox for collecting information. The user
types a message (some of which can be quite long.)
The code runs and does various things including transfering the text from
the textbox into a cell on the worksheet.

Will I have any limitations?

Kenny
Win 2000 and Excel97
 
A cell can hold 32K characters. So I don't think you will have a problem
unless you approach that amount.

Just be advised, that without special efforts, only 1024 of those characters
will be displayed or printed in the sheet. Special efforts would include
inserting hard returns within your data.
 
Hi
In Cell A1 I typed in the formula Rept("a",32767) and got a string, but
when I typed in Rept("a",32768) I got an error. This seems to suggest
that you get about 32K characters. I don't know if you can do better
from VBA
 
From Forms documentation:
By default, you can enter up to 2048 characters in a text box. If you set
the MultiLine property to true, you can enter up to 32 KB of text
From Excel Specs:
32,767 characters. Only 1,024 display in a cell; all 32,767 display in the
formula bar.
Alternative: if you need to exceed these specs you may need to imbed another
"text" object; e.g. a Word document, in your sheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top