Syntaxe VBA a corriger

Please Help

La fonction match ne marche pas. Elle n'arrive pas a recuperer la position de la valeur recherchee

Private Sub CommandButton1_Click()

Dim f1 As Worksheet
Dim ligne As Long
Dim cible As Variant

Set f1 = Sheets("TRACKING")
cible = Me.TextBox1.Value
ligne = Application.WorksheetFunction.Match(cible, Sheets("TRACKING").Range("C1:C"), 0)

If MsgBox("Etes vous sûr de vouloir sauvegarder?", vbYesNo, "confirmation") = vbYes Then

With f1

.Cells(ligne, 13).Value = Me.TextBox4.Value
.Cells(ligne, 14).Value = Me.TextBox5.Value
.Cells(ligne, 12).Value = Me.ComboBox1.Value
.Cells(ligne, 18).Value = Me.TextBox6.Value
.Cells(ligne, 15).Value = Me.ComboBox2.Value
.Cells(ligne, 16).Value = Me.ComboBox3.Value
.Cells(ligne, 17).Value = Me.TextBox7.Value
.Cells(ligne, 19).Value = Me.TextBox8.Value
.Cells(ligne, 21).Value = Me.TextBox9.Value
.Cells(ligne, 20).Value = Me.TextBox10.Value
.Cells(ligne, 22).Value = Me.TextBox11.Value
.Cells(ligne, 23).Value = Me.TextBox12.Value

End With
End If
Unload Me

End Sub

Bonjour,

N'y aurait-il pas un message d'erreur sur cette ligne ? :

ligne = Application.WorksheetFunction.Match(cible, Sheets("TRACKING").Range("C1:C"), 0)

A+

Rechercher des sujets similaires à "syntaxe vba corriger"