![]() |
Excel VBA - Automatic adjusting of 2 windows
My Excel application is splitted into two horizontal windows (not
panes), the one above is a diagram with fixed size in height. The one below is a normal calculation sheet. The problem is how to program in VBA, that the window below always will fill the remaining space of the Excel spreadsheet (the remaining space is depending of the monitor, resolution, the chosen toolbars etc). Thanx Siggy --- Message posted from http://www.ExcelForum.com/ |
Excel VBA - Automatic adjusting of 2 windows
one way:
Const nWINDOW1HEIGHT = 300 'change to suit If Windows.Count < 2 Then Exit Sub With Windows(1) .Top = 0 .Width = Application.UsableWidth .Height = nWINDOW1HEIGHT End With With Windows(2) .Top = nWINDOW1HEIGHT + 1 .Width = Application.UsableWidth .Height = Application.UsableHeight - nWINDOW1HEIGHT End With In article , Geo Siggy wrote: My Excel application is splitted into two horizontal windows (not panes), the one above is a diagram with fixed size in height. The one below is a normal calculation sheet. The problem is how to program in VBA, that the window below always will fill the remaining space of the Excel spreadsheet (the remaining space is depending of the monitor, resolution, the chosen toolbars etc). |
Excel VBA - Automatic adjusting of 2 windows
|
All times are GMT +1. The time now is 05:31 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com