Incompatibilité de type sur macro

flo2002

XLDnaute Impliqué
Re bonjour le forum,

un petit probleme depuis que j'ai adapté une macro:

Option Explicit

Sub IsolePeople()


Application.ScreenUpdating = False
Sheets('AFU').Visible = True
Sheets('Extract_AFU').Visible = True
Sheets('AFU').Select
Sheets('Extract_AFU').Select


Dim Derligne1%, Derligne2%
Dim i1%, i2%
Dim Exist
Derligne1 = Sheets('AFU').Range('B65536').End(xlUp).Row
Derligne2 = Sheets('Extract_AFU').Range('D65536').End(xlUp).Row
For i2 = 1 To Derligne2
For i1 = 1 To Derligne1
If Sheets('Extract_AFU').Range('D' & i2) = Sheets('AFU').Range('B' & i1) Then Exist = 1
GoTo Suivant
End If
Next
If Exist = 1 Then GoTo Suivant
Sheets('AFU').Range('B' & Derligne1 + 1) = Sheets('Extract_AFU').Range('D' & i2)
Derligne1 = Sheets('AFU').Range('B65536').End(xlUp).Row
Suivant:
Exist = 0
Next

Sheets('AFU').Select
Columns('B:B').Select
Range('B300').Activate
Selection.Sort Key1:=Range('B2'), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom


Sheets('Extract_AFU').Visible = False

Sheets('AFU').Visible = False
Application.ScreenUpdating = True
Sheets('Garde').Select


End Sub

En rouge ce qui lui plait pas.

Merci d'avance!

désolé Denis comme tu peux le voir j'ai encore un bug!

Message édité par: flo2002, à: 16/05/2006 10:16
 

Discussions similaires

Statistiques des forums

Discussions
312 497
Messages
2 088 985
Membres
103 998
dernier inscrit
Gotteland