I would like to know how to do the equivalent of the VB6
ThisForm.MyTextArea.SelectStart = Len(MyTextArea)
to always push up from the bottom of my textarea when I add items. I
can't find a way to find length or anything else that would point me
to the bottom and keep that line the last line. I have a simple
WriteLog Sub:
Sub WriteLog(Text)
ThisForm.MyTextArea.Value = ThisForm.MyTextArea.Value & Text &
vbCrLf
' following line is from VB, it gives major errors
TheForm.TextCallProgress.SelectStart = Len(TextCallProgress)
' If I try this, it doesn't appear to do anything
TheForm.TextCallProgress.ScrollIntoView(True)
' If I try this, it won't work when I first run the sub because it
' just entered the first line and says it can't execute yet. I
assume
' because with only one line of text, it can't scroll.
TheForm.TextCallProgress.doScroll
End Sub
Is there a better way, or a way to count lines or put the doScroll
into an If statement to make sure there are lines to scroll before it
tries to scroll? Thanks.
Fred