Avez vous vu mon message #6 où j'arrête ma boucle si le Parent n'est ni un Frame ni un Multipage ?EN TOUT CAS ca ne me dis pas comment arrêter la boucle do/loop
Bonjour danrebAvez vous vu mon message #6 où j'arrête ma boucle si le Parent n'est ni un Frame ni un Multipage ?
Private Sub placementUF()
Dim EcX#, EcY#, X#, Y#, go as boolean
If Not obj Is Nothing Then
EcX = Me.Width - Me.InsideWidth
EcY = Me.Height - Me.InsideHeight
X = obj.Left + obj.Width + EcX: Y = obj.Top + obj.Height
Do
If TypeName(obj.Parent) = "Frame" Or TypeName(obj.Parent) = "Page" Then go = True Else go = False
Set obj = obj.Parent
If TypeName(obj) = "Page" Then Set obj = obj.Parent: Y = Y + (EcX * 3)
X = X + obj.Left + (EcX / 2): Y = Y + obj.Top + (EcX + (EcX / 2))
Loop While go = True
Me.Left = X
Me.Top = Y
End If
End Sub
Et quand c'est un UserForm le bord réel c'est aussi (.Width - .InsideWidth) / 2
une autre chose aussi étant donné que tu a des spinbutton presque les combo sont inutiles