I've got a user-form that generates a large amount of text and puts it into a Textbox.
I have the following function to append the next line of text to the textbox:
Sub AddLineToSQL(sLine As String)
frmSQL.txtSQL.Value = frmSQL.txtSQL.Value & sLine & vbCr
End Sub
When adding several hundred lines of text it takes a while to process (up to 20 seconds).
The problem with this is that there is the possibility of adding more than a thousand lines of text.
We have an old form that does basically the same thing, but I'm trying to create a cleaner user experience. the old form wrote the text to a worksheet, and it seems to work much quicker than appending to the textbox.
Is there a More efficient way to append text to a textbox than what I have above?
should I just do what the old form did and write lines to a worksheet?
Thanks,
Mark