ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text box in form truncates information. Please help (https://www.excelbanter.com/excel-programming/283800-text-box-form-truncates-information-please-help.html)

Kali

Text box in form truncates information. Please help
 
Hello

I have a problem, hope you can help me.
I have an Excel Form that has several text boxes, user
will enter information and data will be saved in a
spreadsheet.

The problem is: text box truncates text entered.

I am using
ActiveCell.Value = myTextBox.Text
ActiveCell.Value = Replace$(ActiveCell.Text, vbCr, "")

Thanks!
Kali

Irais

Text box in form truncates information. Please help
 
The text can be up to 2000 characters.
The textbox is in a UserForm

Irais.

-----Original Message-----
Kali wrote:
The problem is: text box truncates text entered.

I am using
ActiveCell.Value = myTextBox.Text
ActiveCell.Value = Replace$(ActiveCell.Text,

vbCr, "")


How long is the text?
What kind of textbox are you using (UserForm?, Drawing

toolbar? ...)

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

.


Bill Manville

Text box in form truncates information. Please help
 

The problem is in
ActiveCell.Value = Replace$(ActiveCell.Text, vbCr, "")


ActiveCell.Text gives a maximum of 1024 characters.
Change to
ActiveCell.Value = Replace$(ActiveCell.Value, vbCr, "")
and you should be OK.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup


Kali

Text box in form truncates information. Please help
 
That works.
Thank you, Bill M.!

Irais K.

-----Original Message-----

The problem is in
ActiveCell.Value = Replace$(ActiveCell.Text,

vbCr, "")


ActiveCell.Text gives a maximum of 1024 characters.
Change to
ActiveCell.Value = Replace$(ActiveCell.Value,

vbCr, "")
and you should be OK.

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

.



All times are GMT +1. The time now is 11:54 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com