From: WA on
Is it possible to resize an object in excel to a certain number of pixels??
From: Dave Peterson on
I've never done this, but there are a couple of hints in VBA's help. You may
want to read about PointsToScreenPixelsX and PointsToScreenPixelsY (or maybe
search google groups for hints and tips using those keywords).

Michel Pierron (a very smart API type guy) posted this:

Option Explicit
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowRect Lib "user32" _
(ByVal hwnd As Long, lpRect As RECT) As Long
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Sub Ratio()
Dim hwnd&, R As RECT, msg As String
hwnd = FindWindow(vbNullString, Application.Caption)
GetWindowRect hwnd, R
MsgBox "Points/Pixels Ratio: " _
& Application.Width / (R.Right - R.Left) _
& vbTab & "-> (3/4)" & vbLf & "Pixels" _
& "/Points Ratio: " & Format((R.Right - R.Left) _
/ Application.Width, "0.00") & vbTab & "-> (4/3)", 64
End Sub

Maybe you can get the ratio of points to pixels and use that in your
calculations.

WA wrote:
>
> Is it possible to resize an object in excel to a certain number of pixels??

--

Dave Peterson