ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   form appears on second monitor (https://www.excelbanter.com/excel-programming/384760-form-appears-second-monitor.html)

Paul Pedersen

form appears on second monitor
 
In VBA, I have a simple statement to display a form when a certain worksheet
is selected:

Private Sub Worksheet_Activate()
frmMyform.Show
End Sub

But when the form appears, it always appears on the second monitor. It
doesn't matter which monitor is showing the worksheet. Furthermore, even
though both form.top and form.left are zero, the form appears up against the
left edge of the monitor as expected (although the wrong monitor), but
centered vertically.

How can I put the form where I want it?





NickHK

form appears on second monitor
 
Paul,
Look at the .StartUpPosition property of the userform.
May depend also how you have you video display/driver set up.

If you second monitor (physically, left to right) is actually number 1, that
may make sense.
Trying relocating the monitors or switching the numbers to match the left to
right order.

NickHK

"Paul Pedersen" wrote in message
...
In VBA, I have a simple statement to display a form when a certain

worksheet
is selected:

Private Sub Worksheet_Activate()
frmMyform.Show
End Sub

But when the form appears, it always appears on the second monitor. It
doesn't matter which monitor is showing the worksheet. Furthermore, even
though both form.top and form.left are zero, the form appears up against

the
left edge of the monitor as expected (although the wrong monitor), but
centered vertically.

How can I put the form where I want it?







Paul Pedersen

form appears on second monitor
 
I found the startupposition property, thanks.

That second monitor actually is #2. But the problem seems to have gone away
when I set startupposition to Center.




"NickHK" wrote in message
...
Paul,
Look at the .StartUpPosition property of the userform.
May depend also how you have you video display/driver set up.

If you second monitor (physically, left to right) is actually number 1,
that
may make sense.
Trying relocating the monitors or switching the numbers to match the left
to
right order.

NickHK

"Paul Pedersen" wrote in message
...
In VBA, I have a simple statement to display a form when a certain

worksheet
is selected:

Private Sub Worksheet_Activate()
frmMyform.Show
End Sub

But when the form appears, it always appears on the second monitor. It
doesn't matter which monitor is showing the worksheet. Furthermore, even
though both form.top and form.left are zero, the form appears up against

the
left edge of the monitor as expected (although the wrong monitor), but
centered vertically.

How can I put the form where I want it?










All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com