mrdominikku
New Member
- Joined
- Jan 25, 2019
- Messages
- 4
Hi,
In .xlam file I have added UserForm which initialize by set position of the form in middle on main screen with dual monitors.
I am using it commonly in all other forms in xls/xlsm.
I have no clue why this is not applicable to .xlam When I call form from AddIn control menu (after "install"),
form is displaying correcly with values set in Initialize sub, but it somehow ignoring position setup and always displaying in left bottom of second screen.
When I call form by debugging position is correct.
When I put breakpoint in code and call form from AddIn control menu, it's like it ignoring breakpoint
Have anyone met with such behaviour before?
In .xlam file I have added UserForm which initialize by set position of the form in middle on main screen with dual monitors.
I am using it commonly in all other forms in xls/xlsm.
Code:
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)
form is displaying correcly with values set in Initialize sub, but it somehow ignoring position setup and always displaying in left bottom of second screen.
When I call form by debugging position is correct.
When I put breakpoint in code and call form from AddIn control menu, it's like it ignoring breakpoint
Have anyone met with such behaviour before?