indice n'appartient pas à la selection

damdamdeo44

XLDnaute Nouveau
merci bcp pour votre aide

cela marche bien sur excel 2000 mais dès que je le test sur 2010 j'ais un truc bizarre, il me met que l'idice n'appartien pas à la sélection sur cette ligne :

Set c = .Find(Recherche, LookIn:=xlValue, lookat:=xlWhole)


voici le code entier

là je perds mon latin
Code:
Private Sub NC_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
Dim Recherche As String
Dim Ligne As Long
Dim plage As Range
 
 
Application.EnableEvents = False
Application.ScreenUpdating = False
 
Recherche = NC.Value
Range("G8").Select
 
Ligne = Sheets("Suivi NC").Range("G" & "65536").End(xlUp).Row
 
Set plage = Sheets("Suivi NC").Range("G" & "8:" & "G" & Ligne)
 
With plage
    Set c = .Find(Recherche, LookIn:=xlValue, lookat:=xlWhole)
 
    If c Is Nothing Then
 
            Exit Sub
    Else
 
        If Not c Is Nothing Then
 
            ALERT.TNCrecup.Value = c
            Me.ActiveControl = False
            Unload Me
            ALERT.Show
                End If
End If
 
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
 

Discussions similaires

Réponses
2
Affichages
176
Réponses
1
Affichages
196

Statistiques des forums

Discussions
312 500
Messages
2 089 013
Membres
104 004
dernier inscrit
mista