I am running a macro in Word, doing in the background many modifications to the opened document. At the same time, the macro is updating a textbox displayed in the foreground window, to show all modifications done. This textbox acts a bit like a "progress window" when installing a new application (you may sometimes display the list of files that are being installed).
To send new information to the textbox, I am using the method
Textbox.value = Textbox.value & newtext
with newtext being a public string of characters to add.
I also add the line
Progression.TextBox1.SelStart = Len(Progression.TextBox1.Text)
to force the textbox to scroll to the end and hopefully refresh its display.
The problem that I have is that the textbox doesn't always refresh properly, or should I say, I know it is refreshing, but it actually "hangs" as if it was not responding and new text doesn't show up. It is only when the macro is done that all text displays properly and that I can check the textbox has been updated as it should have.
I have the feeling that this happens when the textbox receives lots of updates in a short period of time.
I tried to use the Repaint function, with no luck.
Any suggestion?
To send new information to the textbox, I am using the method
Textbox.value = Textbox.value & newtext
with newtext being a public string of characters to add.
I also add the line
Progression.TextBox1.SelStart = Len(Progression.TextBox1.Text)
to force the textbox to scroll to the end and hopefully refresh its display.
The problem that I have is that the textbox doesn't always refresh properly, or should I say, I know it is refreshing, but it actually "hangs" as if it was not responding and new text doesn't show up. It is only when the macro is done that all text displays properly and that I can check the textbox has been updated as it should have.
I have the feeling that this happens when the textbox receives lots of updates in a short period of time.
I tried to use the Repaint function, with no luck.
Any suggestion?