VBA: userform location on the screen is incorrect in Word365

Eugene Z 20 Reputation points
2025-07-08T10:19:57.78+00:00

Simple test to showcase the problem (in Word VBA):

Create a userform. In UserForm_Activate write

Call Me.Move(0, 0, Application.UsableWidth, Application.UsableHeight)

This is supposed to cover the entire application screen, right?

And in Word2013 is does.

But in Word365 it does not. There are gaps on the left, right and bottom.

To cover the entire screen, you need to make modifications:

Call Me.Move(-5, 0, Application.UsableWidth + 8, Application.UsableHeight + 5)

So, my question is: Are these adjustments system-dependent? Where can I find them, to make the behavior consistent across different Word versions?

Thanks!

More info: I am using StartupPosition manual.

And my app is not actually covering the whole screen - that is just to demonstrate the problem.

My app opens a side-panel (modeless), which opens in the correct position on Word2013, and a different position on Word365.

I don't have any special s/w on my PC, vanilla Windows 10.

Same thing happens on Mac, btw.

Developer technologies | Visual Basic for Applications
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.