LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Center application window

Hi
Trying to center the Excel application.
Screen resalution is 1280 x 1024
newWidth is a long and set to 800
newHeight is a long and set to 600
maxWidth is a long and set to 1280
maxHeight is a long and set to 1024

The following code moves the to far left and to far from the top.

Application.WindowState = xlNormal
Application.Width = newWidth
Application.Height = newHeight
Application.Left = (maxWidth - newWidth) / 2
Application.Top = (maxHeight - newHeight) / 2

Thanks
Harold


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Center spreadsheet in middle of window dgold82[_2_] Excel Programming 1 August 18th 09 08:24 PM
Center displayed columns in middle of window dgold82 Excel Programming 3 June 5th 09 04:49 PM
VBA to center Selected Cell in Current Window [email protected] Excel Programming 2 March 23rd 09 06:02 PM
how do i center the worksheet in the viewing window? Tripp Excel Discussion (Misc queries) 0 March 2nd 07 03:02 PM
How to move pictures to the center of window? tskogstrom Excel Programming 1 August 27th 06 09:14 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"