ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text blocks and multiline textboxes (https://www.excelbanter.com/excel-programming/397873-text-blocks-multiline-textboxes.html)

Mats Samson

Text blocks and multiline textboxes
 
In my Excel purchase, order and invoice application I would like to use
predefined textblocks and insert them to the document Im creating(Except
from also have the possibility to write directly in the textbox).
I previously had an array created by the userform initialization that kept a
limited amount of predefined texts. I wanted to increase the number of text
blocks and decided to create a small database in a worksheet, attach it to
a combobox in the registration userform from where I chose the text block to
be inserted in a temporary text area, a named cell.
The chosen text blocks are copied to a multi line textbox in the userform
where I can stack several text blocks showing up in the final document.
This textbox is connected to the system page, a number of cells containing
all the information for an order or invoice, including the multi line
textbox cell. (When the document is finally registered all the information is
copied to a document database for later retrieval.)

To use a database connected combobox worked well during creation but saving
and reopening the workbook and starting the registration, I get Exception
Occured as soon as I select one of the text blocks. I cannot find any
explanation to what Exception occurred really is, thus finding a way of
solving the problem.

Private Sub CBx407_AfterUpdate() The combobox
CBx407.Copy
End Sub

Private Sub Btn41TL_Click() The button copying the text block in focus
Range("TexTemp").Copy
TxB419.Paste
Application.CutCopyMode = False
End Sub

Private Sub TxB419_AfterUpdate() The textbox updates the system textline
cell
Range("_TL1") = TxB419.Text
End Sub

There is also another problem connected to the textblocks. If I retrieve a
saved document containing several lines of text it often happens that the
application freezes.
Im guessing that copying the stored information containing a multiline text
in a cell and pasting it to the cell that controls the textbox is the
problem. The textbox cannot manage to load a big chunk of text and display it.

Is there any decent way to solve this? It cannot be such an unusual task to
use a textbox when loading and displaying a lot of text!




All times are GMT +1. The time now is 08:25 AM.

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