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
|
Option Explicit
Option Base 1
Public leg, modif, leg_medical As Integer
Public path, fichier, chemin, R574, MEDICAL, vol, Tableau_R574(), flight_number, trigramme As String
Public NomTableau() As Boolean
Sub creation_dossier()
Dim Phyto, Pacotille, DG As String
Phyto = WorksheetFunction.VLookup(Worksheets("Element").Range("G6"), Worksheets("aeroport").Range("Tableau_aerodrome"), 11, False)
Pacotille = WorksheetFunction.VLookup(Worksheets("Element").Range("G6"), Worksheets("aeroport").Range("Tableau_aerodrome"), 10, False)
DG = WorksheetFunction.VLookup(Worksheets("Element").Range("G6"), Worksheets("aeroport").Range("Tableau_aerodrome"), 8, False)
path = "Z:\Ops Sol\PREP VOLS\nouveau_programme"
'IF les cellules ci-dessous ne sont pas remplies alors on ne peut pas lancer la procédure
If Sheets("Element").Range("B3").Value = "" Or Sheets("Element").Range("B5").Value = "" Or Sheets("Element").Range("B6").Value = "" Or Sheets("Element").Range("B9").Value = "" Or Sheets("Element").Range("B27").Value = "" Or Sheets("Element").Range("B30").Value = "" Or Sheets("Element").Range("G6").Value = "" Or Sheets("Element").Range("G7").Value = "" Or Sheets("Element").Range("G27").Value = "" Then
MsgBox "les cases en jaune ne sont pas toutes remplies. Merci de faire le nécéssaire"
Exit Sub
Else
If Sheets("Element").Range("B3").Value = "BE20" Then
Application.Run ("Ajout_devis")
End If
If vol = "MEDICAL" Then
Application.Run ("Ajout_manifest_pax")
End If
Application.Run ("Ajout_enveloppe")
Application.Run ("Ajout_PDVol")
'Application.Run ("Ajout_PO_GO") (j'attends un peu avant de le supprimer complètement)
Application.Run ("Ajout_manifest_fret")
Application.Run ("Ajout_phyto")
Application.Run ("Ajout_mail")
Application.Run ("Ajout_DG")
MsgBox "La création du dossier est terminée."
End If
Set path = Nothing
Set fichier = Nothing
Set Phyto = Nothing
Set Pacotille = Nothing
Erase NomTableau
Erase Tableau_R574
End Sub |
Partager