S
seb34
Guest
Bonjour,
J'ai un problème pour appliquer deux fonctions identiques sous VB.
La première version marche impec:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("B9:B65536").Copy Destination:=Sheets("Feuil2").Range("B4")
Sheets("Feuil2").Range("B4:B4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
End Sub
Ok
Mais je souhaite appliquer cette fonction deux fois avec des valeurs différentes
Je tente ça mais ça marche mal :
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("B9:B65536").Copy Destination:=Sheets("Feuil2").Range("B4")
Sheets("Feuil2").Range("B4:B4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
Range("C9:C65536").Copy Destination:=Sheets("Feuil2").Range("C4")
Sheets("Feuil2").Range("C4:C4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
End Sub
😕
J'ai un problème pour appliquer deux fonctions identiques sous VB.
La première version marche impec:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("B9:B65536").Copy Destination:=Sheets("Feuil2").Range("B4")
Sheets("Feuil2").Range("B4:B4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
End Sub
Ok
Mais je souhaite appliquer cette fonction deux fois avec des valeurs différentes
Je tente ça mais ça marche mal :
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Range("B9:B65536").Copy Destination:=Sheets("Feuil2").Range("B4")
Sheets("Feuil2").Range("B4:B4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
Range("C9:C65536").Copy Destination:=Sheets("Feuil2").Range("C4")
Sheets("Feuil2").Range("C4:C4000").SpecialCells(xl CellTypeBlanks).EntireRow.Delete
End Sub
😕