![]() |
PointsToScreenPixels for Excel97
Since Excel97 does not support the .PointsToScreenPixelsY and
..PointsToScreenPixelsX method of a Window object, how does one emulate this functionality in 97? |
PointsToScreenPixels for Excel97
I have a hard time figuring out what that functionality is. If I run this
code from the example: Sub BB() With ActiveWindow lWinWidth = _ .PointsToScreenPixelsX(.Selection.Width) lWinHeight = _ .PointsToScreenPixelsY(.Selection.Height) End With Cells(1, 1).Value = lWinWidth Cells(2, 1).Value = lWinHeight End Sub the help claims it give the height and width in pixels, but I get different numbers if I move the window around the screen without changing either the selection or the zoom. -- Regards, Tom Ogilvy "MRay" wrote in message ... Since Excel97 does not support the .PointsToScreenPixelsY and .PointsToScreenPixelsX method of a Window object, how does one emulate this functionality in 97? |
PointsToScreenPixels for Excel97
The reason I ask this question is I need to position a UserForm next to a
specific cell within a worksheet. A post from another user had used these methods (PointsToScreenPixelsX and PointsToScreenPixelsY) in a solution for Excel2000. Solution worked on my personal copy of Excel2003 but does not on Excel97 at work. And, obtaining a later version of Excel at work is out of question. Perhaps I need to employ APIs to achieve this functionality. Any suggestions as to which APIs I could use? Thanks. "Tom Ogilvy" wrote: I have a hard time figuring out what that functionality is. If I run this code from the example: Sub BB() With ActiveWindow lWinWidth = _ .PointsToScreenPixelsX(.Selection.Width) lWinHeight = _ .PointsToScreenPixelsY(.Selection.Height) End With Cells(1, 1).Value = lWinWidth Cells(2, 1).Value = lWinHeight End Sub the help claims it give the height and width in pixels, but I get different numbers if I move the window around the screen without changing either the selection or the zoom. -- Regards, Tom Ogilvy "MRay" wrote in message ... Since Excel97 does not support the .PointsToScreenPixelsY and .PointsToScreenPixelsX method of a Window object, how does one emulate this functionality in 97? |
PointsToScreenPixels for Excel97
I havn't personally checked it out but it looks like Chip Pearson has
something available: http://www.cpearson.com/excel/FormPosition.htm Regards, Greg "MRay" wrote: Since Excel97 does not support the .PointsToScreenPixelsY and .PointsToScreenPixelsX method of a Window object, how does one emulate this functionality in 97? |
PointsToScreenPixels for Excel97
Thanks for the tip. I have not played with routines yet but instructions
seem to address my needs. "Greg Wilson" wrote: I havn't personally checked it out but it looks like Chip Pearson has something available: http://www.cpearson.com/excel/FormPosition.htm Regards, Greg "MRay" wrote: Since Excel97 does not support the .PointsToScreenPixelsY and .PointsToScreenPixelsX method of a Window object, how does one emulate this functionality in 97? |
All times are GMT +1. The time now is 03:42 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com