LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default PointsToScreenPixels Documentation Incorrect

Thank you for the suggestion.

When I try your example verbatim, I get "0 x 0" before and after the zoom.

"Gary''s Student" wrote:

Consider this small test:

Sub Macro1()

Range("I6").Select
Columns("I:I").ColumnWidth = 10
Rows("6:6").RowHeight = 20


ActiveWindow.Zoom = 100
With ActiveWindow
lWinWidth = .PointsToScreenPixelsX(.Selection.Width)
lWinHeight = .PointsToScreenPixelsY(.Selection.Height)
End With
MsgBox (lWinWidth & " x " & lWinHeight)

ActiveWindow.Zoom = 50
With ActiveWindow
lWinWidth = .PointsToScreenPixelsX(.Selection.Width)
lWinHeight = .PointsToScreenPixelsY(.Selection.Height)
End With
MsgBox (lWinWidth & " x " & lWinHeight)

End Sub


The first msgbox gives:
84 x 151

the second ( with a much smaller cell) gives:
79x145

--
Gary''s Student - gsnu200713

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Documentation paul johnson Excel Programming 1 January 25th 06 02:32 PM
Documentation paul johnson Excel Programming 3 January 25th 06 09:31 AM
PointsToScreenPixels for Excel97 MRay Excel Programming 4 March 18th 05 04:39 AM
VBA Documentation TJ Walls Excel Programming 5 May 11th 04 01:51 PM
Documentation Mark[_36_] Excel Programming 4 February 5th 04 11:02 AM


All times are GMT +1. The time now is 09:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"