Reputation: 401
I've figured out how to set the ScrollTop in UserForm_Initialize()
however I can't work out how you can set an event on each time a user flicks between a tab/page in a Multipage.
Does MS Word VBA not have a similar function to UserForm_Initialize()
or UserForm_Activate()
for when a tab/page is changed?
My issue is even though I have ScrollTop = 0 in UserForm_Initialize()
, when the user swaps to a new tab/page the focus is changed to focus on the top control (textbox) and the ScrollTop is no longer 0. So I need to reset it.
Upvotes: 0
Views: 1710
Reputation: 401
Found the answer.
Word VBA has a multipage function you can use to determine when a user enters a new page/tab.
For example:
Private Sub MultiPage1_Change()
Me.ScrollTop = 0
End Sub
You would add this to your UserForm module.
Upvotes: 1