Name

window.PointsToScreenPixelsX(Points)

Synopsis

Converts an application width measurement of points to a screen measurement in pixels. The following code displays the screen dimensions in pixels:

Sub TestPointsToPixels(  )
    Application.DisplayFullScreen = True
    Debug.Print Application.Windows(1).PointsToScreenPixelsX(Application.Width)
    Debug.Print Application.Windows(1).PointsToScreenPixelsX(Application.Height)
    Application.DisplayFullScreen = False
End Sub

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.