Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating a textbox without erasing previous data
Hi all, I have a multiline textbox... I've built a loop to write many lines; here is it: For x = 1 To 5 Worksheets("result").Newdatabox.Text = "here is the text" + Chr(10) Next x So as to obtain in the textbox something like: here is the text here is the text here is the text here is the text here is the text However, the problem is that at every loop (1 to 5), it seems that it erases the previous line! And so the only thing I get is: here is the text and that's all!.. How can I use a loop to put text (imported from a range of cell values...) and update my textbox without erasing previous data? Thanks a lot for your help! Cheers. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Updating a textbox without erasing previous data
Of course.
Worksheets("result").Newdatabox.Text = "here is the text" says "this is your text", not "keep your existing text and add the following". Try instead Worksheets("result").Newdatabox.Text = _ Worksheets("result").Newdatabox.Text & "here is the text" + Chr(10) -- HTH. Best wishes Harald Followup to newsgroup only please. "nadir" wrote in message ... Hi all, I have a multiline textbox... I've built a loop to write many lines; here is it: For x = 1 To 5 Worksheets("result").Newdatabox.Text = "here is the text" + Chr(10) Next x So as to obtain in the textbox something like: here is the text here is the text here is the text here is the text here is the text However, the problem is that at every loop (1 to 5), it seems that it erases the previous line! And so the only thing I get is: here is the text and that's all!.. How can I use a loop to put text (imported from a range of cell values...) and update my textbox without erasing previous data? Thanks a lot for your help! Cheers. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding text without erasing previous text? | Excel Discussion (Misc queries) | |||
Prevent previous entered data from updating | Excel Discussion (Misc queries) | |||
Trendline Textbox Not Updating | Charts and Charting in Excel | |||
Erasing a Formula? | Excel Discussion (Misc queries) | |||
Updating Info from a previous worksheet | Excel Worksheet Functions |