1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Do
If Sheets("UCH").Range("A" & Ligne).Value <> "" Then
onglet = Sheets("UCH").Range("A" & Ligne).Value
Sheets(onglet).Select
Nombreligne = ActiveSheet.Range("F4").Value + 1
Débutcopy = Range("F4").Value + 6
Range("A6", "F" & Débutcopy).Select
Selection.Copy
Range("A1").Select
Sheets("Parc automobile").Select
Cells.Find(What:="FIN", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
Selection.Insert Shift:=xlDown
Sheets(onglet).Select
Application.CutCopyMode = False
' mise à jour du lien
Sheets("Parc automobile").Select
Range("A1").Select
Cells.Find(What:=onglet, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:=onglet, TextToDisplay:=onglet
End If
Compteur = Compteur + 1
Ligne = Ligne + 1
Loop Until Compteur > 35 |
Partager