Option Explicit Private Sub Command1_Click() Dim Obj As Object Set Obj = Me.Controls("Command1") MsgBox Obj.Visible End Sub
E.B.
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPrivate Sub Command1_Click() Dim mObj As Object Set mObj = Command1 mObj.Visible = False MsgBox mObj.Name & vbCrLf & "est rendu invisible" End Sub
Private Sub VisibleChange(Obj As Object, VisibleValue As Boolean) Obj.Visible = VisibleValue End Sub Private Sub Command2_Click() VisibleChange Command2, False End Sub