Bonjour,
j'utilise une macro qui me permet de copier une liste de nom d'élèves pour les copier dans une feuille excel.Dans la plage d5:d402.
La première fois que j'exécute la macro ça fonctionne mais la deuxième fois `ca ne fonctionne pas le curseur ne se positionne pas à la première cellule vide pour continuer ma liste.
Pouvez-vous m'aider??
Merci!! voici la macro
Range("B407").Select
ActiveSheet.Paste
Range("D407:d450").Select
Selection.Hyperlinks.Delete
Range("D407450").Select
Application.CutCopyMode = False
Selection.Copy
Range("D5").Select
If ActiveCell.Offset(1, 0) = "" Then
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=False
Application.CutCopyMode = False
Else
[d65000].End(xlUp).Select
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=False
Application.CutCopyMode = False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End If
End Sub
j'utilise une macro qui me permet de copier une liste de nom d'élèves pour les copier dans une feuille excel.Dans la plage d5:d402.
La première fois que j'exécute la macro ça fonctionne mais la deuxième fois `ca ne fonctionne pas le curseur ne se positionne pas à la première cellule vide pour continuer ma liste.
Pouvez-vous m'aider??
Merci!! voici la macro
Range("B407").Select
ActiveSheet.Paste
Range("D407:d450").Select
Selection.Hyperlinks.Delete
Range("D407450").Select
Application.CutCopyMode = False
Selection.Copy
Range("D5").Select
If ActiveCell.Offset(1, 0) = "" Then
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=False
Application.CutCopyMode = False
Else
[d65000].End(xlUp).Select
ActiveCell.Offset(1, 0).PasteSpecial Paste:=xlValues, Transpose:=False
Application.CutCopyMode = False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
With Selection
.HorizontalAlignment = xlLeft
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End If
End Sub