When workbook opens, the excel maximizes. I have tested the code line by line, and it does not work as I like. I think (Application.Height / 2) - (40 / 2) is the distance from B, not A. So the correct code should be Activesheet.Shapes("CommandButton1").Top = (Application.Height / 2) - (40 / 2) - hPlease Login or Register to view this content.
But how can I compute h?
I would like to put the command button in the center of screen.
Thanks.
h.jpg
Bookmarks