How to determine the size of the screen in points?

%3CLINGO-SUB%20id%3D%22lingo-sub-2778506%22%20slang%3D%22en-US%22%3EHow%20to%20determine%20the%20size%20of%20the%20screen%20in%20points%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2778506%22%20slang%3D%22en-US%22%3E%3CP%3EI%20would%20like%20to%20zoom%20or%20change%20the%20size%20of%20the%20selected%20cells%20or%20all%20cells%20with%20content%20to%20the%20size%20of%20the%20screen%20so%20that%20all%20cells%20are%20visible.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20did%20not%20see%20a%20%22Zoom%20to%20Selection%22%20type%20function%20in%20VBA%20to%20correspond%20with%20the%20Excel%20button.%20Is%20there%20one%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20current%20attempt%20will%20be%20to%20resize%20the%20.ColumnWidth%20and%20.RowHeight%20properties%20to%20the%20total%20screen%20size%20divided%20by%20the%20number%20of%20columns%20and%20rows%20(respectively).%20However%2C%20I%20would%20prefer%20not%20to%20compute%20this%20number%20myself.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20it%20common%20knowledge%20or%20listed%20in%20relevant%20documentation%20what%20the%20size%20of%20the%20Excel%20screen%20is%20in%20%22points%22%20(or%20twips)%2C%20the%20Excel%20distance%20quantity%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20this%20attribute%20be%20accessed%20from%20the%20Excel%20Object%20Model%20via%20the%20Component%20Object%20Model%20(COM)%3F%20Is%20there%20some%20API%20for%20that%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20very%20much%20for%20any%20assistance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2778506%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2778550%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20determine%20the%20size%20of%20the%20screen%20in%20points%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2778550%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1154117%22%20target%3D%22_blank%22%3E%40jukhamil%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice%2Fvba%2Fapi%2Fexcel.window.pointstoscreenpixelsx%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ERead%20this%20article%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

I would like to zoom or change the size of the selected cells or all cells with content to the size of the screen so that all cells are visible.

 

I did not see a "Zoom to Selection" type function in VBA to correspond with the Excel button. Is there one?

 

My current attempt will be to resize the .ColumnWidth and .RowHeight properties to the total screen size divided by the number of columns and rows (respectively). However, I would prefer not to compute this number myself.

 

Is it common knowledge or listed in relevant documentation what the size of the Excel screen is in "points" (or twips), the Excel distance quantity?

 

Could this attribute be accessed from the Excel Object Model via the Component Object Model (COM)? Is there some API for that?

 

Thank you very much for any assistance.

1 Reply