Bonjour .
je suis en cours de réalisation d'un fichier sur excel 2016.
Je rencontre une erreur que je n'arrives pas à résoudre.
Voici le code responsable:
'******************************************************************************************************************************
'**************************************Changement du contenu du champ FORMATION du formulaire******************************
'************************************************************************************************************************************
Private Sub ComboBoxFormMat_Change()
'************************************** VARIABLES **********************************************************************
'************************************************************************************************************************************
Dim dernierLigneId As Long
Dim LastLigForm As Long
Dim nomFormCh As Variant
Dim nomFormTr As Range
Dim CptLig As Long
Dim IDFormationTrouvee As Range
Dim ligneCelluletrouve As Long
Dim ValArret As Integer
'************************************** INITIALISATIONS DE VARIABLE **************************
'************************************************************************************************************************************
nomFormCh = CVar(Me.ComboBoxFormMat.Value)
Sheets("Id").Activate
'************************************** INITIALISATIONS DE VARIABLE '*************************************************************************************************************
If nomFormCh = "" Then 'SI LE NOM CHERCHE EST VIDE ALORS
Exit Sub 'SORTIE DE LA PROCEDURE
Else 'SINON
LastLigForm = Sheets("Id").Range("B1048576").End(xlUp).Row 'RECUPERATION DU NUMERO DE DERNIERE LIGNE DU TABLEAU
With Range("B2:B" & LastLigForm)
Set nomFormTr = .Find(CVar(Me.ComboBoxFormMat.Value))
If Not nomFormTr Is Nothing Then
ligneCelluletrouve = nomFormTr.Row
modifNomForm = nomFormTr
volTotHForm = Cells(ligneCelluletrouve, 3)
idForm = Cells(ligneCelluletrouve, 1)
etatChpSup = 1
CptLig = LastLigForm
'Me.ComboBoxMatiere.ListIndex = -1
End If
End With
End If
End Sub
Le debogeur s'arrete à la ligne suivante:
Set nomFormTr = .Find(CVar(Me.ComboBoxFormMat.Value))
et me donne ce message d'erreur.
Je penses que c'est le typage donné au Find qui ne va pas mais je ne sais pas .
Merci par avance si vous avez des lumières à m'apporter.