ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Opening a workbook with a specified size? (https://www.excelbanter.com/excel-programming/326640-opening-workbook-specified-size.html)

42

Opening a workbook with a specified size?
 
Hello everyone,

Is there a way to program a workbook to always open in a specific
window size?

Thanks for any help,
~Jonathan


Lonnie M.

Opening a workbook with a specified size?
 
To code something to happen when you open a workbook, take a look at
Workbook_Open in the VBA help

OR

See the various 'Open Events' at Chip Pearson's site:
http://www.cpearson.com/excel/events.htm

As far as the sizing of the window:
Application.WindowState = xlNormal
Application.Width = 717
Application.Height = 487.5

HTH--Lonnie M.


K Dales[_2_]

Opening a workbook with a specified size?
 
See below: but if you want to ensure that the window size (actual inches) is
consistent regardless of the user's display properties (screen resolution)
that is a much more difficult question.

Private Sub Workbook_Open()

Application.WindowState = xlNormal
Application.Width = 500
Application.Height = 300

End Sub


"42" wrote:

Hello everyone,

Is there a way to program a workbook to always open in a specific
window size?

Thanks for any help,
~Jonathan



Jonathan Landrum

Opening a workbook with a specified size?
 
Thanks, K Dales. That's exactly what I'm looking for. How do I go about
ensuring a user of the network will open the workbook at a specified
resolution. Does the solution you offered do that?

~Jonathan

*** Sent via Developersdex http://www.developersdex.com ***

42

Opening a workbook with a specified size?
 
Thanks, Lonnie. I appreciate your swift reply.

~Jonathan

Ps: I'll let you guys know if it works over the network ;)



All times are GMT +1. The time now is 11:59 PM.

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