Sub test1() 'avec les api en macro4
MsgBox PtsToPx
End Sub
Function PtsToPx()
Static px#: Dim Dc&
If px = 0 Then
Dc = ExecuteExcel4Macro("CALL(""user32"",""GetDC"",""JJJ"",0)")
px = ExecuteExcel4Macro("CALL(""gdi32"",""GetDeviceCaps"",""JJJ""," & Dc & ", " & 88 & ")") / 72
End If
PtsToPx = px
End Function