Userform hiding command button under white border

SlinkRN

Well-known Member
Joined
Oct 29, 2002
Messages
724
I am having an issue with a userform that contains a listbox. It seems to be something to do with the monitor screen size. When I open the userform on a larger monitor screen, the userform has a white section that is hiding the "Select" button that should be showing under the listbox. The userform has a white space at the bottom and right that covers up the "Select"Button.
1632432724652.png

When I slide the userform over to my laptop screen, it shows as it should. I want it to show all the time though for all users regardless of their monitor size.
1632432801191.png

I have this code in the userform_initialize section so that the form opens in the same screen as the Excel app. Could this have something to do with it?
Private Sub UserForm_initialize()
Me.StartUpPosition = 0
Me.Left = Application.Left + (0.5 * Application.Width) - (0.5 * Me.Width)
Me.Top = Application.Top + (0.5 * Application.Height) - (0.5 * Me.Height)
End Sub

These are the properties of the userform and Listbox:
1632432973640.png
1632433063957.png
 

Attachments

  • 1632432708798.png
    1632432708798.png
    86.8 KB · Views: 18

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I think such problems appear on systems with big difference in the resolutions of the multiple screens.
You can try to open the form in the designer and Bring-to-top (or front) the command button. See if it helps.
 
Upvote 0
I think such problems appear on systems with big difference in the resolutions of the multiple screens.
You can try to open the form in the designer and Bring-to-top (or front) the command button. See if it helps.
Thanks bobsan42. Great suggestion but when I tried that just now, it did not bring the button to the front of that weird white border. I wound up moving the button much further down in the userform which is kind of strange looking but at least the users can get to it that way. Thanks for the explanation of the monitor size, that makes sense. Maybe Microsoft can figure out something to make userforms not act strangely when the monitor sizes change.
 
Upvote 0
As strange as it seems, on a certain system with dual monitors and great resolution difference simply grabbing the title bar and moving the form resolves the form size issue. However it may not be an universal solution. And certainly not a practical one.
 
Upvote 0
Solution
As strange as it seems, on a certain system with dual monitors and great resolution difference simply grabbing the title bar and moving the form resolves the form size issue. However it may not be an universal solution. And certainly not a practical one.
Ha! I'll have to try that!!
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top