C
Chris Watts
I have a userform whose main component is a TextBox. It is locked as the
user is only permitted to read not edit the data there - that is done in the
main spreadsheet and the userform is modeless. The TextBox has a vertical
scroll bar to permit the user to navigate around its contents. The user
will not normally place the focus on the Textbox contents itself but just
use the scrollbar..
The data in the textbox is updated programattically (using vba). When this
happens the box contents scroll back to the top - I do not want this to
happen. I want the scroll position to remain as the user has set it. How
can I achive this? I have tried SelStart and SelLength but these don't
achive this - the before and after update values are always 0. I have tried
reading and resetting CurLine (with SetFocus) but no luck there - I actually
get an error if the user has never placed the cursor in the textbox.
So how can I read the current setting of the scrollbar and then reinstate
it?
Using Excel 2007
TIA
Chris
user is only permitted to read not edit the data there - that is done in the
main spreadsheet and the userform is modeless. The TextBox has a vertical
scroll bar to permit the user to navigate around its contents. The user
will not normally place the focus on the Textbox contents itself but just
use the scrollbar..
The data in the textbox is updated programattically (using vba). When this
happens the box contents scroll back to the top - I do not want this to
happen. I want the scroll position to remain as the user has set it. How
can I achive this? I have tried SelStart and SelLength but these don't
achive this - the before and after update values are always 0. I have tried
reading and resetting CurLine (with SetFocus) but no luck there - I actually
get an error if the user has never placed the cursor in the textbox.
So how can I read the current setting of the scrollbar and then reinstate
it?
Using Excel 2007
TIA
Chris