Thread: [Solved] Excel VBA: PixelsToPoints???
View Single Post
 
Old 04-16-2012, 05:17 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

From Word's vba Help file:
Code:
MsgBox "320x240 pixels is equivalent to " _
    & PixelsToPoints(320, False) & "x" _
    & PixelsToPoints(240, True) _
    & " points on this display."
Also from Word's vba Help file:
Code:
MsgBox "180x120 points is equivalent to " _
    & PointsToPixels(180, False) & "x" _
    & PointsToPixels(120, True) _
    & " pixels on this display."
Excel doesn't have the same methods, so you can't do this from Excel unless you use the Windows API or an application whose object model does support them.

PS: Please don't post Excel vba queries in the Word vba forum - post them in the Excel forum.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote