1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
| 'Range("B1").Activate
'ActiveCell.EntireColumn.Select
' Application.CutCopyMode = False
' Selection.Copy
'ActiveWorkbook.Sheets("entrepot").Activate
'Range("A1").Select
' pas = 1
' Do Until Selection = ""
' Selection.Offset(0, pas).Select
'
'' Loop
' 'Cells(1, pas + 2).Select
' ActiveCell.EntireColumn.Select
' ActiveSheet.Paste
'Variante de la section transitoire
pas = 1
''Range(Cells(1, 2), Cells(20, 2)).Select
'' Application.CutCopyMode = False
'' Selection.Copy
'' ActiveWorkbook.Sheets("entrepot").Activate
'' Range("A:A").Value = Empty
'' Range("B1").Select
'' Do Until Selection = ""
'' Selection.Offset(0, pas).Select
'' pas = pas + 1
'' Loop
'' Cells(1, pas + 1).Select
'Range(Cells(1, 1 + pas), Cells(20, 1 + pas)).Select
'Variante:
'' ActiveSheet.Cells(1, 1 + pas).Activate
'' r = 1 + pas
'' ActiveSheet.Paste
'2ème variante d'après Développeurs.com
ActiveWorkbook.Sheets("entrepot").Activate
Range("A:A").Value = Empty
Range("B1").Select
Do Until Selection = ""
Selection.Offset(0, pas).Select
pas = pas + 1
Loop
ThisWorkbook.Sheets("entrepot").Range(Cells(1, pas), Cells(20, pas)).Copy ThisWorkbook.Sheets _
("feuille_syntagmes").Range(Cells(1, 2), Cells(20, 2))
'Range(Cells(1, 1 + pas), Cells(20, 1 + pas)).Select
'fin de la Variante N° 1:
'' ActiveSheet.Cells(1, 1 + pas).Activate
'' r = 1 + pas
'' ActiveSheet.Paste |
Partager