How can I add a horizontal scrollbar to a VBA ListBox

后端 未结 6 1053
星月不相逢
星月不相逢 2021-01-14 00:49

I\'d like to add a horizontal scrollbar to a VBA ListBox.

It appears that the built in ListBox does not add a horizontal scrollbar automatically. I have a number of

6条回答
  •  一整个雨季
    2021-01-14 01:28

    Handle to he list box can be obtained as follows :-

    Dim ListHwnd As Integer lstboxName.SetFocus ListHwnd = GetFocus()

    Use this ListHwnd as the first parameter to the sendmessage function...

    We need to provide the declaration below,Since GetFocus function is not present in VBA by default

    Private Declare Function GetFocus Lib "user32" () As Integer

提交回复
热议问题