Sub demo() Dim CtrlTest As String On Error Resume Next CtrlTest = MaForm.Controls.Item("cmdapercu").Caption If Not Err = 0 Then MsgBox "la cuillere n'existe pas ! " End Sub
Private Sub Command1_Click() MsgBox voir(Commandbidon) MsgBox voir(Command1) End Sub Private Function voir(toto) As Boolean voir = True If TypeName(toto) "Empty" Then voir False End Function