Re : Problème de placement du copier coller
Re,
oui... voir post ci-dessous.... suffit d'adapter les cellules en conséquence...
https://www.excel-downloads.com/threads/copier-colle-special.184027/
Re,
J'ai essayé mais j'ai un problème j'ai mis le code suivant :
Sub test1()
Dim x As Range, y As Range
Set y = Cells.Find("balise de fin", , xlValues, xlWhole, , , False)
Set x = Cells.Find("Balise de début", , xlValues, xlWhole, , , False)
If Not y Is Nothing And Not x Is Nothing Then
If Not Intersect(ActiveCell, Range("B:B")) Is Nothing Then
With Range(x, y)
Range("ActiveCell").Resize(.Rows.Count, .Columns.Count).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
Range("ActiveCell").Resize(.Rows.Count, .Columns.Count) = .Value
End With
Else
MsgBox "cellule active pas dans la colonne B"
End If
End If
End Sub
et on m'indique une erreur d'exécution '1004': La méthode 'Range' de l'objet '_Global' a échoué.
L'erreur vient de cette ligne :
Range("ActiveCell").Resize(.Rows.Count, .Columns.Count).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow