Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionReDim toto(Frame1.Controls.Count) ' As Control
For i = 0 To Frame1.Controls.Count - 1
Set toto(i).ethop = Frame1.Controls(i)
Next
Public toto() As New Classe1
Option Explicit
Public WithEvents ethop As MSForms.CommandButton
Private Sub ethop_click()
UserForm1.TextBox1.SelText = UserForm1.Frame1.ActiveControl.Caption
End Sub
Private Sub ethop_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
If Shift Then
UserForm1.TextBox1.SelText = UserForm1.Frame1.ActiveControl.Caption
Else
UserForm1.TextBox1.SelText = LCase(UserForm1.Frame1.ActiveControl.Caption)
End If
End Sub