Display my UserForm on the far left of the screen

C_Rieker

New Member
Joined
Nov 22, 2020
Messages
16
Office Version
  1. 365
Platform
  1. Windows
I have a UserForm that I named UF_Home. On initialisation, the UserForm ensures that the application is set to maximised, my UserForm is set to display to far left of the application and then the Excel application is set to Visible=False.

My issue is that the UserForm has a small gap on the far left of the screen. How to I move it over that tiny bit?

Also, I have tried to do
VBA Code:
.Left = Application.Left - 5
but this doesnt change the left positioning (Even if I do 100 instead of 5)

VBA Code:
Private Sub UserForm_Initialize()

    Application.WindowState = xlMaximized

    With UF_Home
        .Width = Application.Width
        .Height = Application.Height
        .Left = Application.Left
        .Top = Application.Top
    End With
    
    Application.Visible = False

End Sub

Below is a screenshot. Note the gap on the far left and how the UserForm is slightly cut off on the far right.

Cheers in advanced you amazing people

SceenShot.png
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You could make the UserForm take up the full screen...here

Or
this thread may give you some further ideas
 
Upvote 0
You could make the UserForm take up the full screen...here

Or
this thread may give you some further ideas

Thank-you for your prompt reply. However, after following these suggestions, my UserForm still displays with a gap to the left.
 
Upvote 0
Just place this line at the start of your code:
VBA Code:
UF_Home.StartUpPosition = 0
 
Upvote 0
Solution

Forum statistics

Threads
1,214,954
Messages
6,122,461
Members
449,085
Latest member
ExcelError

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