我在 vba 中使用 userForm,并且有一个列表框 我将用户窗体的方向更改为从右到左,现在我想让水平滚动条在用户窗体启动时向右。我尝试了很多代码,但它不起作用。
在此输入图像描述 在此输入图片描述
这对我有用,但无法在 365 中测试。
重要的是文本结尾不能是 CR/LF,因为这会将光标设置到第一个位置。
Private Sub UserForm_Initialize()
Me.RightToLeft = True
text1 = "Here you can place any text only to check the final result" & Chr(10) & "of the position of the scroll bar" & Chr(10)
text2 = text1 & "Here you can place any text only to check the final result" & Chr(10) & "Here you can place any text only to check the final result" & Chr(10)
Me.TextBox1.Text = text2 & "Here you can place any text only to check the final result" & Chr(10) & "Here you can place any text only to check the final resultHere you can place any text only to check the final result" 'no CR/LF at the end.
End Sub