Sub UserFormAlign() 'positionnement userform à côté cellule active
' 1 inch = 72 points for usually 96 or 120 dpi
Dim X#, Y# ', w#, h#
X = GetDeviceCaps(GetDC(0), 88) ' / 72
Y = GetDeviceCaps(GetDC(0), 90) ' / 72
With UCalendrier
.StartUpPosition = 0
.Left = (ActiveWindow.PointsToScreenPixelsX(UserActif.Tdate.Left * X) * 1 / X) + 500 '****plante ici
.Top = (ActiveWindow.PointsToScreenPixelsY(UserActif.Tdate.Top * Y) * 1 / Y) + 150 '****et là
End With
End Sub