E
Excel Monkey
I have a text box which I am appending text to via code. I want the ability
to force the scroll bar down to the bottom each time the text is appended. I
put the following code into the AfterUpdate Event. However this event does
not fire when adding text via code. The only way I can get it to work is if
I change the Userform .Enabled property to FALSE. However this disables the
buttons on the userform. So then I tried to simply set the Enabled property
of the Textbox to FALSE. Howevever when I do this, the textbox does not
scroll nor are the scroll bars visible. How do I allow the user to scroll,
force the scroll bar to the bottom and not disable any button on the form?
Private Sub TextBox1_AfterUpdate()
On Error Resume Next
lLine = TextBox1.CurLine
TextBox1.CurLine = lLine
On Error GoTo 0
End Sub
Thanks
EM
to force the scroll bar down to the bottom each time the text is appended. I
put the following code into the AfterUpdate Event. However this event does
not fire when adding text via code. The only way I can get it to work is if
I change the Userform .Enabled property to FALSE. However this disables the
buttons on the userform. So then I tried to simply set the Enabled property
of the Textbox to FALSE. Howevever when I do this, the textbox does not
scroll nor are the scroll bars visible. How do I allow the user to scroll,
force the scroll bar to the bottom and not disable any button on the form?
Private Sub TextBox1_AfterUpdate()
On Error Resume Next
lLine = TextBox1.CurLine
TextBox1.CurLine = lLine
On Error GoTo 0
End Sub
Thanks
EM