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
|
Sub Table_AS_IS()
'
' Table_AS_IS Macro
' Création de la table AS_IS
'
'
'Si la feuille table AS_IS n'existe pas, elle est créée et est nommée "table AS_IS"
If Not (FeuilleExiste("table AS_IS")) Then
Sheets.Add
ActiveSheet.Name = "table AS_IS"
End If
Worksheets("table AS_IS").Select
'Sinon(si elle existe déjà),on efface tous ce qui est dans les colonnes A jusqu\'à Q'
Worksheets("table AS_IS").Range("A:Z").Clear
Worksheets("Eric_Output_opti_AS_IS_TO_BE").Range("B:B,C:C,D:D,N:N,O:O,P:P,A:A,E:E,F:F,G:G,H:H,I:I,J:J,K:K,L:L,M:M").Copy Destination:=Worksheets("table AS_IS").Range("A1")
End Sub
Function FeuilleExiste(Nom As String) As Boolean
On Error GoTo Err_FeuilleExiste
FeuilleExiste = False
FeuilleExiste = Not Worksheets(Nom) Is Nothing
Err_FeuilleExiste:
End Function |
Partager