{"text_format":"1","workbook":"xlsx","n_sheets":7,"sheets":["Macro ou Fonction","Variables","Conditions","pour des tables","Boucles","Dialogue-Sélection","exemples"],"not_rendered":{"charts":0,"images":2,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Macro ou Fonction","index":0,"n_rows":16,"n_cols":15,"rows_kept":16,"cut":false,"hidden":false,"merged":[]}
["Les macros (procédures) et les fonctions"]
[]
[null,"! Une macro fait un certain nombre d'opérations qui ont été programmées"]
[null,"pour rendre la macro accessible dans tout le classeur",null,null,null,null,null,"pour rendre la macro inaccessible hors du module",null,null,null,null,null,"pour appeler une macro dans une autre macro"]
[null,"Public Sub macro()",null,null,null,null,null,"Private Sub macro()",null,null,null,null,null,"Private Sub macro1()"]
[null,null,"instructions",null,null,null,null,null,"instructions",null,null,null,null,null,"instructions"]
[null,"End Sub",null,null,null,null,null,"End Sub",null,null,null,null,null,"End Sub"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,"Public Sub macro2()"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"instructions"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,null,"macro1"]
[null,null,null,null,null,null,null,null,null,null,null,null,null,"End Sub"]
[null,"! Une fonction renvoie une valeur à partir d'une ou plusieurs valeurs"]
[null,"pour déclarer une fonction"]
[null,"Function Max_Deux_Cellules(cellule1 As Range, cellule2 As Range)"]
[null,null,"If cellule1 > cellule2 Then …"]
[null,"End Function"]

{"sheet":"Variables","index":1,"n_rows":20,"n_cols":9,"rows_kept":20,"cut":false,"hidden":false,"merged":[]}
["Liste des types de variables en vba",null,null,null,"pour déclarer un tableau "]
[]
["Nom","Type","Pour gérer :",null,null,"mois","charges","produits","résultats"]
["Byte","Numérique","Nombre entier de 0 à 255.",null,null,1,1821,2540,{"$f":"H4-G4","v":719}]
["Integer","Numérique","Nombre entier de -32'768 à 32'767.",null,null,2,2170,4113,{"$f":"H5-G5","v":1943}]
["Long","Numérique","Nombre entier de - 2'147'483'648 à 2'147'483'647.",null,null,3,1755,3921,2166]
["Currency","Numérique","Nombre à décimale fixe de -922'337'203'685'477.5808 à 922'337'203'685'477.5807.",null,null,4,1578,3058,1480]
["Single","Numérique","Nombre à virgule flottante de -3.402823E38 à 3.402823E38.",null,null,5,1877,4565,2688]
["Double","Numérique","Nombre à virgule flottante de -1.79769313486232D308 à 1.79769313486232D308.",null,null,6,1249,4784,3535]
["String","Texte","Texte.",null,null,7,1975,1737,-238]
["Date","Date","Date et heure.",null,null,8,537,4769,4232]
["Boolean","Boolean","True (vrai) ou False (faux).",null,null,9,895,2408,1513]
["Object","Objet","Objet",null,null,10,2275,4337,2062]
["Variant","Tous","Tout type de données (type par défaut si la variable n'est pas déclarée).",null,null,11,597,4440,3843]
["Worksheet","objet","feuille de calcul du classeur",null,null,12,1677,4399,2722]
["Workbook","objet","classeur",null,null,"le tableau comprend 12 lignes et 4 colonnes hors entêtes"]
[null,null,null,null,null,"la nature des contenus doit être identique"]
[null,"La déclaration d'une variable se fait avec l'instruction DIM",null,null,null,"Dim tab_calcul_res(12;4) As currency"]
[null,"Dim x As Integer",null,null,null,"on peut aussi déclarer colonne par colonne sans mettre le type"]
[null,null,null,null,null,"Dim charges(12)",null,null," 'etc."]

{"sheet":"Conditions","index":2,"n_rows":20,"n_cols":6,"rows_kept":20,"cut":false,"hidden":false,"merged":[]}
["les conditions"]
[]
[null,"opérateur","signification",null,"agrégateur","signification"]
[null,"=","Est égal à",null,"And","vérifie les 2 conditions"]
[null,"<>","Est différent de",null,"Or","vérife une des 2 conditions"]
[null,"<","Est plus petit que",null,"Not","ne vérifie pas la condition"]
[null,"<=","Est plus petit ou égal à"]
[null,">","Est plus grand que"]
[null,">=","Est plus grand ou égal à"]
[]
[]
[null,"Une \"alternative\" c’est-à-dire une condition peut inclure plusieurs instructions"]
[null,"If condition Then ",null,"If condition Then "]
[null,null," instruction 1",null," instruction 1"]
[null,null," instruction 2",null,"Else ","If condition Then "]
[null,null," instruction 3",null,null," instruction 2"]
[null,"Else "," ' peut ne pas être utilisé",null,null,"Else "]
[null,null,"instruction 4",null,null," instruction 3"]
[null,null,"instruction 5",null,null,"END If"]
[null,"END If",null,"END If"]

{"sheet":"pour des tables","index":3,"n_rows":1,"n_cols":1,"rows_kept":1,"cut":false,"hidden":false,"merged":[]}
[" l’instruction Select Case comme alternative à l’utilisation d’ElseIf dans If... "]

{"sheet":"Boucles","index":4,"n_rows":16,"n_cols":13,"rows_kept":16,"cut":false,"hidden":false,"merged":[]}
["Les boucles"]
[]
[null,"Pour un nombre fixe d'itérations",null,null,null,null,"Pour une réitération tant que la condition est vraie",null,null,null,null,"Pour une réitération jusqu'à "]
[null,"For NumeroMois = 1 To 12 Step 1",null,null,null,null,"NumeroMois = 1",null,null,null,null,"NumeroMois = 1"]
[null,null,"instruction 1",null,null,null,"Do While NumeroMois <= 12",null,null,null,null,"Do Until NumeroMois = 12"]
[null,null,"instruction 2",null,null,null,null,"instructions 1 2 3",null,null,null,null,"instructions 1 2 3"]
[null,null,"instruction 3",null,null,null,null,"NumeroMois = NumeroMois + 1",null,null,null,null,"NumeroMois = NumeroMois + 1"]
[null,"Next",null,null,null,null,"Loop",null,null,null,null,"Loop"]
[]
[null,"et aussi …"]
[null,"Pour toutes les onglets du classeur"]
[null,"DIM onglet AS Worksheet"]
[null,"For Each onglet IN Worksheets"]
[null,null,"instruction 1"]
[null,null,"instruction 2"]
[null,"Next"]

{"sheet":"Dialogue-Sélection","index":5,"n_rows":13,"n_cols":14,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
["Les boîtes de dialogue, les plages et les sélections"]
[]
[null,"sélectionner une cellule",null,null,null,"sélectionner une plage de cellules",null,null,null,"sélectionner des cellules",null,null,null,"effacer une cellule"]
[null,"Range(\"H1\").Select",null,null,null,"Range(\"H1:K1\").Select",null,null,null,"Range(\"H1 , K1\").Select",null,null,null,"Range(\"H1\").ClearContents"]
[]
[]
[null,"affecter une valeur à une cellule",null,null,null,"aller à une feuille de calcul",null,null,null,"aller à un classeur"]
[null,"Range(\"A1\").Value = 1",null,null,null,"Sheets(\"Conditions\").Activate",null,null,null,"Workbooks(\"vba.xlsm\").Activate"]
[]
[]
[null,"afficher un message",null,null,null,"saisir dans une boîte de dialogue"]
[null,"MsgBox \"Bonjour ;)\"",null,null,null,"Dim NomMois As String"]
[null,null,null,null,null,"NomMois = InputBox(\"Mois ? : \")"]

{"sheet":"exemples","index":6,"n_rows":20,"n_cols":11,"rows_kept":20,"cut":false,"hidden":false,"merged":[]}
["TTC","Tx_Tva","Ht",null,"pour voir le détail des arguments et des calculs il faut aller dans formules / insérer une fonction"]
[1200,0.2,{"$f":"HORS_TAXE(A2,B2)","v":1000}]
[]
[]
["Ne jamais oublier de sauvegarder en xlsm !!!"]
[]
[]
["Dates","2028-06-01","2028-07-15","2028-08-03","2029-02-20","2029-04-24","2029-05-24","2029-08-02","2029-09-20","2029-09-28","2029-10-20"]
["Décade",{"$f":"IF(DAY(B8)<=10,DATE(YEAR(B8),MONTH(B8),10),IF(DAY(B8)<=20,DATE(YEAR(B8),MONTH(B8),20),DATE(YEAR(B8),MONTH(B8)+1,1)-1))","v":"2028-06-10"},{"$f":"Decade_du_Jour(C8)","v":"2028-07-20"},{"$f":"Decade_du_Jour(D8)","v":"2028-08-10"},{"$f":"Decade_du_Jour(E8)","v":"2029-02-20"},{"$f":"Decade_du_Jour(F8)","v":"2029-04-30"},{"$f":"Decade_du_Jour(G8)","v":"2029-05-31"},{"$f":"Decade_du_Jour(H8)","v":"2029-08-10"},{"$f":"Decade_du_Jour(I8)","v":"2029-09-20"},{"$f":"Decade_du_Jour(J8)","v":"2029-09-30"},{"$f":"Decade_du_Jour(K8)","v":"2029-10-20"}]
[null,null,null,null,null,null,null,"Public Function Decade_du_Jour(DateJour As Date)"]
[null,null,null,null,null,null,null,"    If Day(DateJour) <= 10 Then"]
[null,null,null,null,null,null,null,"        Decade_du_Jour = DateSerial(Year(DateJour), Month(DateJour), 10)"]
[null,null,null,null,null,null,null,"        Else"]
[null,null,null,null,null,null,null,"        If Day(DateJour) <= 20 Then"]
[null,null,null,null,null,null,null,"            Decade_du_Jour = DateSerial(Year(DateJour), Month(DateJour), 20)"]
[null,null,null,null,null,null,null,"            Else"]
[null,null,null,null,null,null,null,"            Decade_du_Jour = DateSerial(Year(DateJour), Month(DateJour) + 1, 1) - 1"]
[null,null,null,null,null,null,null,"            End If"]
[null,null,null,null,null,null,null,"    End If"]
[null,null,null,null,null,null,null,"End Function"]