Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Private Declare Function GetLastError Lib "kernel32" () As Long
  2.  
  3. Public Ods As udtOds
  4. Public OdsR As udtOds
  5. Public OdsW As udtOds
  6. Public User As udtUser
  7. Public UserR As udtUser
  8. Public UserW As udtUser
  9.  
  10. Type udtUser
  11.     Lang As String
  12. End Type
  13.  
  14. Public Type udtFile
  15.       FileName As String
  16.       CreationDate As Date
  17. End Type
  18.  
  19. Public Type udtOds
  20.  
  21.     ClientEntreprise As String
  22.     ClientRue As String
  23.     ClientVille As String
  24.     ClientProvince As String
  25.     ClientCodePostal As String
  26.     ClientSexe As String
  27.     ClientPrenom As String
  28.     ClientNom As String
  29.     ClientTitre As String
  30.    
  31.     EntenteDatePresente As String
  32.     EntenteCommencant As String
  33.     EntenteTerminant As String
  34.     EntenteAcceptation As String
  35.     EntentePeriode As String
  36.    
  37.     DirecteurSignataire1Sexe As String
  38.     DirecteurSignataire1Titre As String
  39.     DirecteurSignataire1Prenom As String
  40.     DirecteurSignataire1Nom As String
  41.     DirecteurSignataire1Telephone As String
  42.     DirecteurSignataire1Email As String
  43.    
  44.     DirecteurSignataire2Sexe As String
  45.     DirecteurSignataire2Titre As String
  46.     DirecteurSignataire2Prenom As String
  47.     DirecteurSignataire2Nom As String
  48.     DirecteurSignataire2Telephone As String
  49.     DirecteurSignataire2Email As String
  50.     DirecteurSignataire2Impression As String
  51.    
  52.     GestionnaireSexe As String
  53.     GestionnaireDirigeant As String
  54.     GestionnairePrenom As String
  55.     GestionnaireNom As String
  56.     Files(500) As udtFile
  57.    
  58. End Type
  59.  
  60.  
  61. Public Sub SaveUser()
  62.  
  63.   Dim canal As Integer
  64.   canal = FreeFile
  65.  
  66.   With UserW
  67.    
  68.      .Lang = GetLang 'lang setter function
  69.      
  70.   End With
  71.  
  72.   On Error Resume Next
  73.      Open ThisDocument.Path & "\user.conf" _
  74.           For Random Access Write As #canal Len = Len(UserW)
  75.      Put canal, 1, UserW
  76.      Close canal
  77.   On Error GoTo 0
  78.  
  79. End Sub
  80.  
  81. Public Sub GetUser()
  82.   Dim canal As Integer
  83.   canal = FreeFile
  84.  
  85.   On Error Resume Next
  86.     Open ThisDocument.Path & "\user.conf" _
  87.          For Random Access Read As #canal Len = Len(User)
  88.         Get canal, 1, User
  89.     Close canal
  90.   On Error GoTo 0
  91.    
  92. End Sub
  93.  
  94. Public Sub SaveAnOds()
  95.  
  96.     With Ods
  97.        .Compagny = "Walmart"
  98.     End With
  99.    
  100.   canal = FreeFile
  101.  
  102.   On Error Resume Next
  103.      Open ThisDocument.Path & "\Ods.ods" _
  104.           For Random Access Write As #canal Len = Len(Ods)
  105.      Put canal, 1, Ods
  106.      Close canal
  107.   On Error GoTo 0
  108.  
  109. End Sub
  110.  
  111. Public Sub SaveArchives()
  112.  
  113.     With Ods
  114.        .Compagny = "Walmart"
  115.     End With
  116.    
  117.   canal = FreeFile
  118.  
  119.   On Error Resume Next
  120.      Open ThisDocument.Path & "\Ods.ods" _
  121.           For Random Access Write As #canal Len = Len(Ods)
  122.      Put canal, 1, Ods
  123.      Close canal
  124.   On Error GoTo 0
  125.  
  126. End Sub
  127.  
  128. Public Sub ReadOds()
  129.  
  130.   Dim canal As Integer
  131.   canal = FreeFile
  132.  
  133.   On Error Resume Next
  134.    
  135.     Open ThisDocument.Path & "\lol.ods" _
  136.          For Random Access Read As #canal Len = Len(Save)
  137.         Get canal, 1, Save
  138.     Close canal
  139.   On Error GoTo 0
  140.    
  141. End Sub
  142.  
  143. Public Sub ReadOdsx()
  144.  
  145.   Dim canal As Integer
  146.   canal = FreeFile
  147.  
  148.   On Error Resume Next
  149.    
  150.     Open ThisDocument.Path & "\user.config" _
  151.          For Random Access Read As #canal Len = Len(User)
  152.         Get canal, 1, User
  153.     Close canal
  154.    
  155.   On Error GoTo 0
  156.    
  157. End Sub
  158.  
  159. Public Sub LoadArchives()
  160.  
  161.     Dim canal As Integer
  162.     canal = FreeFile
  163.    
  164.   On Error Resume Next
  165.     Open ThisDocument.Path & "\user.conf" _
  166.          For Random Access Read As #canal Len = Len(UserR)
  167.         Get canal, 1, UserR
  168.     Close canal
  169.   On Error GoTo 0
  170.  
  171.   frmIdentification.cmbArchives.AddItem "Selectionner dequoi"
  172.  
  173.   'display the saved enterprise
  174.    For i = 0 To 9
  175.         If UserR.Archives(i).Name <> "" Then
  176.         'MsgBox "SC2!!! " & UserR.Archives(i).Name
  177.            frmIdentification.cmbArchives.AddItem UserR.Archives(i).Name
  178.          End If
  179.     Next
  180.    
  181.     frmIdentification.cmbArchives.ListIndex = 0
  182.    
  183.  
  184. End Sub
  185. Public Sub LoadArchives2()
  186.    
  187.     'LUC AJOUT DES TEMPLATES FOLDER DANS LE DROPDOWN
  188.    Dim fileList() As String
  189.     Dim fName As String
  190.     Dim fPath As String
  191.     Dim i As Integer
  192.        
  193.     fPath = ThisDocument.Path & "\Archives\"
  194.    
  195.     fName = Dir$(fPath & "\*.ods", vbDirectory)
  196.     While fName <> ""
  197.         i = i + 1
  198.         ReDim Preserve fileList(1 To i)
  199.         fileList(i) = fName
  200.         fName = Dir()
  201.     Wend
  202.     If i = 0 Then
  203.         MsgBox "No files found"
  204.         Exit Sub
  205.     End If
  206.     For i = 1 To UBound(fileList)
  207.         myFile = fileList(i)
  208.         If myFile <> "." And myFile <> ".." Then
  209.             myFile = Replace(myFile, ".ods", "")
  210.             If myFile <> "" Then
  211.                 frmIdentification.cmbArchives.AddItem (myFile)
  212.             End If
  213.         End If
  214.     Next
  215.    
  216.    frmIdentification.cmbArchives.ListIndex = 0
  217.    
  218. End Sub
  219.  
  220. Public Sub LoadLanguage()
  221.  
  222.   Dim canal As Integer
  223.   canal = FreeFile
  224.    
  225.   On Error Resume Next
  226.     Open ThisDocument.Path & "\user.conf" _
  227.          For Random Access Read As #canal Len = Len(UserR)
  228.         Get canal, 1, UserR
  229.     Close canal
  230.   On Error GoTo 0
  231.  
  232.   If UserR.Lang = "F" Then
  233.     blnFrench = True
  234.     frmIdentification.Optfrancais.Value = 1
  235.     versionFrancaise 'Change les labels
  236.  Else
  237.      blnFrench = False
  238.      frmIdentification.Optenglish.Value = 1
  239.      versionEnglish 'Change les labels
  240.  End If
  241.    
  242. End Sub
  243.  
  244. Public Function GetLang()
  245.  
  246.     If frmIdentification.Optfrancais Then
  247.         GetLang = "F"
  248.     Else
  249.         GetLang = "E"
  250.     End If
  251.    
  252. End Function
  253.  
  254. Public Sub Quitter()
  255.     SaveUser
  256.     Unload frmDocuments
  257.     Unload frmIdentification
  258.     Unload frmValider
  259.     Cancel = True
  260. End Sub
  261.  
  262. Public Sub SaveOds()
  263.     Dim OdsW As udtOds
  264.     Dim canal As Integer
  265.     Dim file As String
  266.    
  267.     canal = FreeFile
  268.     file = ThisDocument.Path & "\Archives\" & frmIdentification.txtCie & ".ods"
  269.  
  270.     With OdsW
  271.    
  272.         'CLIENT
  273.        .ClientEntreprise = frmIdentification.txtCie
  274.        
  275.         .ClientRue = frmIdentification.txtNoRue
  276.         .ClientVille = frmIdentification.txtVille
  277.         .ClientProvince = frmIdentification.txtProv
  278.         .ClientCodePostal = frmIdentification.txtZip
  279.         If frmIdentification.optSexM Then
  280.            .ClientSexe = "M"
  281.         Else
  282.            .ClientSexe = "F"
  283.         End If
  284.         .ClientPrenom = frmIdentification.txtDestPrenom
  285.         .ClientNom = frmIdentification.txtDestNom
  286.         .ClientTitre = frmIdentification.txtTitre
  287.        
  288.         'ENTENTE
  289.        .EntenteDatePresente = frmIdentification.Txtdate
  290.         .EntenteCommencant = frmIdentification.TxtDebut
  291.         .EntenteTerminant = frmIdentification.txtFin
  292.         .EntenteAcceptation = frmIdentification.txtAcceptation
  293.         .EntentePeriode = frmIdentification.Txtdurée
  294.        
  295.         'DIRECTEUR #1
  296.        If frmIdentification.OptionButton2 Then
  297.            .DirecteurSignataire1Sexe = "M"
  298.         Else
  299.            .DirecteurSignataire1Sexe = "F"
  300.         End If
  301.         .DirecteurSignataire1Titre = frmIdentification.cmbTitre1
  302.         .DirecteurSignataire1Prenom = frmIdentification.txtDCprenom
  303.         .DirecteurSignataire1Nom = frmIdentification.txtDCnom
  304.         .DirecteurSignataire1Telephone = frmIdentification.txtDCtel
  305.         .DirecteurSignataire1Email = frmIdentification.txtDCemail
  306.        
  307.         'DIRECTEUR #2
  308.        If frmIdentification.OptionButton3 Then
  309.            .DirecteurSignataire2Sexe = "M"
  310.         Else
  311.            .DirecteurSignataire2Sexe = "F"
  312.         End If
  313.         .DirecteurSignataire2Titre = frmIdentification.cmbTitre2
  314.         .DirecteurSignataire2Prenom = frmIdentification.txtDPprenom
  315.         .DirecteurSignataire2Nom = frmIdentification.txtDPnom
  316.         .DirecteurSignataire2Telephone = frmIdentification.txtDPtel
  317.         .DirecteurSignataire1Email = frmIdentification.txtDPemail
  318.         .DirecteurSignataire2Impression = ""
  319.        
  320.         'GESTIONNAIRE
  321.        If frmIdentification.OptionButton5 Then
  322.            .GestionnaireSexe = "M"
  323.         Else
  324.            .GestionnaireSexe = "F"
  325.         End If
  326.         .GestionnaireDirigeant = frmIdentification.cmbTitreIntro
  327.         .GestionnairePrenom = frmIdentification.txtPrenomIntro
  328.         .GestionnaireNom = frmIdentification.txtNomIntro
  329.        
  330.        'FICHIERS DE L'ODS
  331.        For i = 0 To frmDocuments.listDocAjouter.ListCount - 1
  332.             .Files(i).FileName = frmDocuments.listDocAjouter.List(i)
  333.         Next i
  334.        
  335.     End With
  336.  
  337.     '1.DELETE LE FICHIER AVEC LA MÊME ENTREPRISE
  338.    '(PCQ ELLE VA ÊTRE REMPLACER PAR CELLE-CI DE TOUTE FACON,)
  339.    '2.TRIM POUR AVOIR X FICHIERS - 1
  340.    '(PCQ APRÈS AVOIR ENREGISTRER ON VA AVOIR X FICHIERS)
  341.    '3.ON ENREGISTRE L'ODS DE L'ENTREPRISE
  342.    '(PCQ C'EST LE BUT FINAL)
  343.    
  344.     '1.
  345.    If FileExists(file) Then
  346.         Kill file
  347.     End If
  348.    
  349.     '2.
  350.        TrimArchives
  351.     '3.
  352.    On Error Resume Next
  353.        Open file _
  354.             For Random Access Write As #canal Len = Len(OdsW)
  355.        Put canal, 1, OdsW
  356.        Close canal
  357.     On Error GoTo ErrH
  358.    
  359. ErrH:
  360.     Dim Texte As String
  361.     Dim Label As String
  362.     If Err.Number = 53 Then
  363.       Texte = "Il est impossible d'ouvrir le fichier OffreSer.ini" & vbCrLf & vbCrLf & _
  364.               "Veuillez communiquer avec l'Unité de vente - Commercial au" & vbCrLf & _
  365.               "(514) 394-5000, poste 3533 ou au 1-800-361-8688, poste 3533."
  366.       Label = "Cette macro ne peut fonctionner correctement et sera " & _
  367.               "interrompue."
  368.       MsgBox "shibby  " & Texte, vbCritical, Label
  369.       End
  370.     Else
  371.         MsgBox "shibby2 Erreur # " & Err.Number & ", " & Err.Description, vbCritical
  372.         MsgBox GetLastError()
  373.     End If
  374.    
  375. End Sub
  376.  
  377. Public Sub SaveOds2()
  378.     Dim OdsW As udtOds
  379.     Dim canal As Integer
  380.     Dim file As String
  381.    
  382.     canal = FreeFile
  383.     file = ThisDocument.Path & "\Archives\" & frmIdentification.txtCie & ".ods"
  384.  
  385.     With OdsW
  386.    
  387.         'CLIENT
  388.        .ClientEntreprise = frmIdentification.txtCie
  389.        
  390.         .ClientRue = frmIdentification.txtNoRue
  391.         .ClientVille = frmIdentification.txtVille
  392.         .ClientProvince = frmIdentification.txtProv
  393.         .ClientCodePostal = frmIdentification.txtZip
  394.         If frmIdentification.optSexM Then
  395.            .ClientSexe = "M"
  396.         Else
  397.            .ClientSexe = "F"
  398.         End If
  399.         .ClientPrenom = frmIdentification.txtDestPrenom
  400.         .ClientNom = frmIdentification.txtDestNom
  401.         .ClientTitre = frmIdentification.txtTitre
  402.        
  403.         'ENTENTE
  404.        .EntenteDatePresente = frmIdentification.Txtdate
  405.         .EntenteCommencant = frmIdentification.TxtDebut
  406.         .EntenteTerminant = frmIdentification.txtFin
  407.         .EntenteAcceptation = frmIdentification.txtAcceptation
  408.         .EntentePeriode = frmIdentification.Txtdurée
  409.        
  410.         'DIRECTEUR #1
  411.        If frmIdentification.OptionButton2 Then
  412.            .DirecteurSignataire1Sexe = "M"
  413.         Else
  414.            .DirecteurSignataire1Sexe = "F"
  415.         End If
  416.         .DirecteurSignataire1Titre = frmIdentification.cmbTitre1
  417.         .DirecteurSignataire1Prenom = frmIdentification.txtDCprenom
  418.         .DirecteurSignataire1Nom = frmIdentification.txtDCnom
  419.         .DirecteurSignataire1Telephone = frmIdentification.txtDCtel
  420.         .DirecteurSignataire1Email = frmIdentification.txtDCemail
  421.        
  422.         'DIRECTEUR #2
  423.        If frmIdentification.OptionButton3 Then
  424.            .DirecteurSignataire2Sexe = "M"
  425.         Else
  426.            .DirecteurSignataire2Sexe = "F"
  427.         End If
  428.         .DirecteurSignataire2Titre = frmIdentification.cmbTitre2
  429.         .DirecteurSignataire2Prenom = frmIdentification.txtDPprenom
  430.         .DirecteurSignataire2Nom = frmIdentification.txtDPnom
  431.         .DirecteurSignataire2Telephone = frmIdentification.txtDPtel
  432.         .DirecteurSignataire1Email = frmIdentification.txtDPemail
  433.         .DirecteurSignataire2Impression = ""
  434.        
  435.         'GESTIONNAIRE
  436.        If frmIdentification.OptionButton5 Then
  437.            .GestionnaireSexe = "M"
  438.         Else
  439.            .GestionnaireSexe = "F"
  440.         End If
  441.         .GestionnaireDirigeant = frmIdentification.cmbTitreIntro
  442.         .GestionnairePrenom = frmIdentification.txtPrenomIntro
  443.         .GestionnaireNom = frmIdentification.txtNomIntro
  444.        
  445.        'FICHIERS DE L'ODS
  446.        For i = 0 To frmDocuments.listDocAjouter.ListCount - 1
  447.            .Files(i).FileName = frmDocuments.listDocAjouter.List(i)
  448.         Next i
  449.        
  450.     End With
  451.  
  452.     '1.DELETE LE FICHIER AVEC LA MÊME ENTREPRISE
  453.    '(PCQ ELLE VA ÊTRE REMPLACER PAR CELLE-CI DE TOUTE FACON,)
  454.    '2.TRIM POUR AVOIR X FICHIERS - 1
  455.    '(PCQ APRÈS AVOIR ENREGISTRER ON VA AVOIR X FICHIERS)
  456.    '3.ON ENREGISTRE L'ODS DE L'ENTREPRISE
  457.    '(PCQ C'EST LE BUT FINAL)
  458.    
  459.     '1.
  460.    If FileExists(file) Then
  461.         Kill file
  462.     End If
  463.    
  464.     '2.
  465.        TrimArchives
  466.     '3.
  467.    Open file _
  468.         For Random Access Write As #canal Len = 10000
  469.     Put canal, 1, OdsW
  470.     Close canal
  471.    
  472. End Sub
  473.  
  474. Public Sub LoadOds()
  475.  
  476.     Dim canal As Integer
  477.     Dim FileName As String
  478.    
  479.     canal = FreeFile
  480.    
  481.     fInitialize
  482.    
  483.     FileName = ThisDocument.Path & "\Archives\" & frmIdentification.cmbArchives.Value & ".ods"
  484.        
  485.     If FileExists(FileName) Then
  486.        
  487.         'LE TEMPLATE EXISTE ON LE LOAD.
  488.        On Error Resume Next
  489.    
  490.         Open FileName _
  491.          For Random Access Read As #canal Len = Len(OdsR)
  492.    
  493.         Get canal, 1, OdsR
  494.         Close canal
  495.        
  496.       On Error GoTo 0
  497.          
  498.          'GESTION DES SEXES
  499.         Select Case OdsR.DirecteurSignataire1Sexe
  500.                 Case "F"
  501.                      frmIdentification.OptionButton1.Value = 1
  502.                 Case "M"
  503.                      frmIdentification.OptionButton2.Value = 1
  504.          End Select
  505.          Select Case OdsR.DirecteurSignataire2Sexe
  506.                 Case "F"
  507.                      frmIdentification.OptionButton4.Value = 1
  508.                 Case "M"
  509.                      frmIdentification.OptionButton3.Value = 1
  510.          End Select
  511.          Select Case OdsR.GestionnaireSexe
  512.                 Case "F"
  513.                      frmIdentification.OptionButton6.Value = 1
  514.                 Case "M"
  515.                      frmIdentification.OptionButton5.Value = 1
  516.          End Select
  517.          Select Case OdsR.ClientSexe
  518.                 Case "F"
  519.                      frmIdentification.optSexF.Value = 1
  520.                 Case "M"
  521.                      frmIdentification.optSexM.Value = 1
  522.          End Select
  523.          'FIN DE LA GESTION DES SEXES.
  524.  
  525.            With frmIdentification
  526.                 'CLIENT
  527.               .txtProv = Trim(OdsR.ClientProvince)
  528.                .txtVille = Trim(OdsR.ClientVille)
  529.                .txtCie = Trim(OdsR.ClientEntreprise)
  530.                .txtDestNom = Trim(OdsR.ClientNom)
  531.                .txtDestPrenom = Trim(OdsR.ClientPrenom)
  532.                .txtNoRue = Trim(OdsR.ClientRue)
  533.                .txtTitre = Trim(OdsR.ClientTitre)
  534.                .txtZip = Trim(OdsR.ClientCodePostal)
  535.                
  536.                'DIRECTEUR #1
  537.               .txtDCnom = Trim(OdsR.DirecteurSignataire1Nom)
  538.                .txtDCprenom = Trim(OdsR.DirecteurSignataire1Prenom)
  539.                .txtDCtel = Trim(OdsR.DirecteurSignataire1Telephone)
  540.                
  541.                 'DIRECTEUR #2
  542.               .txtDPnom = Trim(OdsR.DirecteurSignataire2Nom)
  543.                .txtDPprenom = Trim(OdsR.DirecteurSignataire2Prenom)
  544.                .txtDPtel = Trim(OdsR.DirecteurSignataire2Telephone)
  545.                
  546.                 'GESTIONNAIRE
  547.               .txtNomIntro = Trim(OdsR.GestionnaireNom)
  548.                .txtPrenomIntro = Trim(OdsR.GestionnairePrenom)
  549.                .cmbTitreIntro = Trim(OdsR.GestionnaireDirigeant)
  550.                
  551.                .lblVersion = APP_VERSION
  552.            End With
  553.            
  554.             Dim z As Integer
  555.             z = 0
  556.            
  557.             Do While OdsR.Files(z).FileName <> ""
  558.                 'MsgBox "Loading : " & OdsR.Files(z).FileName 'HERE IT POPS!
  559.                LoadFile (OdsR.Files(z).FileName)
  560.                 z = z + 1
  561.             Loop
  562.                
  563.         Else
  564.             MsgBox "Error, cannot load this template.", vbCritical
  565.     End If
  566.    
  567. End Sub
  568.  
  569. Sub TrimArchives()
  570.     'GARDE SEULEMENT LES 20 DERNIERES ARCHIVES.
  571.    Dim strFileName As String
  572.     Dim strOldestFile As String
  573.     Dim strFolder As String
  574.     Dim iFileCount As Integer
  575.     Dim i As Integer
  576.     Dim dt As Date
  577.    
  578.     strFolder = ThisDocument.Path & "\Archives"
  579.     strFileName = Dir$(strFolder & "\*")
  580.     strOldestFile = strFileName
  581.     dt = FileDateTime(strFolder & "\" & strFileName)
  582.     Do Until strFileName = ""
  583.     Debug.Print strFileName, FileDateTime(strFolder & "\" & strFileName),
  584.         If (FileDateTime(strFolder & "\" & strFileName)) < dt Then
  585.             dt = FileDateTime(strFolder & "\" & strFileName)
  586.             strOldestFile = strFileName
  587.         End If
  588.         i = i + 1
  589.         strFileName = Dir$()
  590.     Loop
  591.     If i > 19 Then
  592.         Kill strFolder & "\" & strOldestFile
  593.     End If
  594. End Sub
  595.  
  596. Sub total()
  597.     Dim total As Integer
  598.     total = frmDocuments.listDocAjouter.ListCount
  599.     frmDocuments.lbltotal.Caption = total
  600. End Sub
  601.  
  602. Public Function LoadFile(ByVal file)
  603.     'LOAD FILE
  604.    'Me.listDocAjouter.AddItem Me.listDocDisp.Text
  605.    'Me.listDocDisp.RemoveItem Me.listDocDisp.ListIndex
  606.    'MsgBox "TotalSize: " & frmDocuments.listDocDisp.ListCount - 1
  607.    While i < frmDocuments.listDocDisp.ListCount - 1
  608.         'MsgBox "TotalSizel: " & frmDocuments.listDocDisp.ListCount - 1
  609.        If frmDocuments.listDocDisp.List(i) = file Then
  610.             'MsgBox file
  611.            frmDocuments.listDocDisp.RemoveItem (i)
  612.             frmDocuments.listDocAjouter.AddItem file
  613.         End If
  614.         i = i + 1
  615.     Wend
  616. End Function
  617.  
  618. Public Function Validate() As Boolean
  619.     If frmIdentification.txtCie.Value = "" Then
  620.             MsgBox "Remplir le champ entreprise svp"
  621.             Validate = False
  622.         Else
  623.             Validate = True
  624.     End If
  625. End Function
  626. Public Sub EmptyFields()
  627.  
  628.     'Vide tous les champs
  629.  
  630.     With frmIdentification
  631.        
  632.         'Archives
  633.        .cmbArchives.ListIndex = 0
  634.        
  635.         'Client
  636.        .txtCie = ""
  637.         .txtNoRue = ""
  638.         .txtVille = ""
  639.         .txtZip = ""
  640.         .txtProv = ""
  641.         .txtDestPrenom = ""
  642.         .txtDestNom = ""
  643.         .txtTitre = ""
  644.         .optSexM = 0
  645.         .optSexM = 0
  646.        
  647.         'Directeur #1
  648.        .txtDPnom = ""
  649.         .txtDPprenom = ""
  650.         .txtDPtel = ""
  651.         .OptionButton1 = 0
  652.         .OptionButton2 = 0
  653.        
  654.         'Directeur #2
  655.        .txtDCnom = ""
  656.         .txtDCprenom = ""
  657.         .txtDCtel = ""
  658.         .OptionButton3 = 0
  659.         .OptionButton4 = 0
  660.         .CheckBox1 = 0 'Checkbox pour l'impression
  661.        
  662.         'Gestionnaire
  663.        .txtNomIntro = ""
  664.         .txtPrenomIntro = ""
  665.         .cmbTitreIntro = ""
  666.         .OptionButton5 = 0
  667.         .OptionButton6 = 0
  668.        
  669.         'Entente
  670.      
  671.        
  672.         .txtAcceptation = ""
  673.         .TxtDebut = ""
  674.         .txtFin = ""
  675.         .Txtdurée = ""
  676.        
  677.         .cmbTitre1.ListIndex = -1
  678.         .cmbTitre2.ListIndex = -1
  679.        
  680.         If frmIdentification.Optfrancais Then
  681.              .Txtdate = Format(Date, "d MMMM yyyy")
  682.         Else
  683.              .Txtdate = Format(Date, "MM/dd/yyyy")
  684.         End If
  685.        
  686.     End With
  687.    
  688. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement