Windows


Window Object Properties

There are quite few properties which you might think belong to the workbook or the worksheet objects but in fact belong to the Window object.
The following are all properties of the Window object (and not the workbook or worksheet)
ActiveCell
DisplayFormulas
DisplayGridlines
DisplayHeading
Selection



SelectedSheets

If you want to detect what sheets are currently grouped then you can use the SelectedSheets property of the Window object.
You might think that the SelectedSheets property should be a property of the Workbook but the reason for this is that you can open many windows on the same workbook and each window can have a different group of worksheets selected.

Activewindow(1).Windows(1).SelectedSheets.Count 



Height, Width

Total height in points of the active window

ActiveWindow.Height 

Total width in points on the active window

ActiveWindow.Width 


Top, Left

The position inside the main Excel window

ActiveWindow.Top 
ActiveWindow.Left


Split

ActiveWindow.Split = False 

A maximised window has a top = -17 and a left = -275


If Windows.Count > 1 Then 
End If

Zoom

ActiveWindow.Zoom = 100 


TabRatio

Returns or sets the ratio of the width of the workbook's tab area to the width of the window's horizontal scroll bar (as a number between 0 (zero) and 1; the default value is 0.6).
This property has no effect when DisplayWorkbookTabs is set to False (its value is retained, but it has no effect on the display).

ActiveWindow.TabRatio = 0.5 


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext