#include #include #include GUICreate("Statistikor v2", 300, 280, 400, 300) $logo = GUICtrlCreatePic("Z:\Stats Générales\STATS GENERALES v2\fidu.jpeg", 5, 5, 90, 49) $title = GUICtrlCreateLabel("Fiducial Dardilly", 100, 20, 200, 20) Guictrlsetfont($title, 13, 800, 2, "Lucida Handwriting") Guictrlsetcolor($title, 0x000000) $tab = GUICtrlCreateTab(30, 70, 238, 199) $tab0 = GUICtrlCreateTabItem("Préparation") $periode = GUICtrlCreateLabel("Veuillez choisir la période :",55,110,300,20) GUICtrlSetFont($periode, 12, 800, 4, "Calibri") Guictrlsetcolor($periode, 0xED0000) $tab0_combo_annee=GUICtrlCreateCombo ("Année", 40,150,100,120) GUICtrlSetData(-1,"2009|2010|2011|2012", "Année") $tab0_combo_mois=GUICtrlCreateCombo ("Mois",155,150,100,120) GUICtrlSetData(-1,"Janvier|Février|Mars|Avril|Mai|Juin|Juillet|Août|Septembre|Octobre|Novembre|Décembre", "Mois") $tab0_bouton=GUICtrlCreateButton ("OK", 123,230,50,20) GUICtrlSetFont($tab0_bouton, 11, 800) Guictrlsetcolor($tab0_bouton, 0xED0000) $tab1 = GUICtrlCreateTabItem("Stock Négoce") $tab2 = GUICtrlCreateTabItem("SAV") $tab3 = GUICtrlCreateTabItem("Achats") GUICtrlCreateTabitem ("") GUISetState() choix_periode() Opt('MustDeclareVars', 1) Func choix_periode() Local $choix_service Local $msg Local $tab0_bouton Local $choix_annee, $choix_mois Local $tab0_combo_mois, $tab0_combo_annee Local $box Local $excelopen Local $prepa_gal_2009 = "Z:\Stats Générales\STATS GENERALES v2\PREPARATION\2009\Préparation 2009.xlsm" While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop $choix_service = GUICtrlRead($tab) Switch $choix_service Case 0 If $msg = $tab0_bouton Then $choix_annee = GUICtrlRead($tab0_combo_annee) $choix_mois = GUICtrlRead($tab0_combo_mois) Switch $choix_annee Case "Année" MsgBox(48, "SAISIE INCORRECTE", "Veuillez sélectionner l'année, SVP") Case "2009" Switch $choix_mois Case "Mois" MsgBox(48, "SAISIE INCORRECTE", "Veuillez sélectionner le mois, SVP") Case "Janvier" $box = MsgBox(1, "[ ------------- CONFIRMATION ------------- ]", "Veuillez confirmer votre choix : " & $choix_mois & $choix_annee) If $box = 1 Then $excelopen = _ExcelBookOpen($prepa_gal_2009) EndIf Case "Février" Case "Mars" EndSwitch Case "2010" MsgBox(0, "", "2010") Case "2011" MsgBox(0, "", "2011") Case "2012" MsgBox(0, "", "2012") EndSwitch EndIf Case 1 Case 2 Case 3 EndSwitch WEnd EndFunc