Dear Forum,
I'm trying to force a listbox on an Excel 365 userform to display the vertical scrollbar by default. This is due to the fact that when my workbook shows the form on different monitors, sometimes the vertical scrollbar doesn't show, even when there are data below the visible area.
I have researched many postings on the web and on this forum, but haven't found success. My best guess is that I need an API call, similar to the code below. However, what I have tried isn't working, because I need to get the hWnd of the listbox itself, which I can't seem to do. I'm not super-familiar with using API calls in VBA, which I'm sure is part of the problem. Though I have used them from time to time.
Does anyone have any insight on this?
This is the code I have put in the header of the Userform module.
And I tried to set the hWnd using this code, which won't compile, and lists the hwnd member as the problem.
Any help would be much appreciated. This thread has NOT been cross-posted.
Thanks!
Brian
Bookmarks