I want to place my userform in a specific position on the screen.
When I run the code in break mode and step through it, it works fine (slightly down from the top and a bit in from the right)
When I run it outside of break mode, the userform gets placed in the upper right corner of the screen, not my intended position.
What is causing it to run differently outside of break mode?
userform_clear_btn.StartUpPosition = 0
userform_clear_btn.Top = Application.Height * 0.05
userform_clear_btn.Left = Application.Left + Application.Width - userform_clear_btn.Width - 15
userform_clear_btn.Show vbModeless
When I run the code in break mode and step through it, it works fine (slightly down from the top and a bit in from the right)
When I run it outside of break mode, the userform gets placed in the upper right corner of the screen, not my intended position.
What is causing it to run differently outside of break mode?
userform_clear_btn.StartUpPosition = 0
userform_clear_btn.Top = Application.Height * 0.05
userform_clear_btn.Left = Application.Left + Application.Width - userform_clear_btn.Width - 15
userform_clear_btn.Show vbModeless