PointsToScreenPixels for Excel97

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Since Excel97 does not support the .PointsToScreenPixelsY and
..PointsToScreenPixelsX method of a Window object, how does one emulate this
functionality in 97?
 
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.
 
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.
 
Thanks for the tip. I have not played with routines yet but instructions
seem to address my needs.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top