{"id":299,"date":"2022-12-04T05:51:41","date_gmt":"2022-12-04T04:51:41","guid":{"rendered":"http:\/\/lesmrdtrucs.mataf35400.fr\/?page_id=299"},"modified":"2022-12-06T08:33:00","modified_gmt":"2022-12-06T07:33:00","slug":"les-fonctions-qui-servent-souvent","status":"publish","type":"page","link":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/les-fonctions-qui-servent-souvent\/","title":{"rendered":"Les fonctions qui servent souvent"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"299\" class=\"elementor elementor-299\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2b806615 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2b806615\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-49ccb98c\" data-id=\"49ccb98c\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-799dad81 elementor-widget elementor-widget-heading\" data-id=\"799dad81\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">File Scripting Object<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-77a1250c elementor-widget elementor-widget-heading\" data-id=\"77a1250c\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Files<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-592ca6de elementor-widget elementor-widget-text-editor\" data-id=\"592ca6de\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><b>Description<\/b>: Donne acc\u00e8s aux propri\u00e9t\u00e9s d&rsquo;un fichier.<br \/><b>Note<\/b>: Le code suivant illustre l&rsquo;obtention d&rsquo;un objet File et l&rsquo;affichage d&rsquo;une de ses propri\u00e9t\u00e9s.<br \/><span style=\"color: #0000ff;\"><em>Function ShowDateCreated(filespec)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim fso, f<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Set fso = CreateObject(\u00ab\u00a0Scripting.FileSystemObject\u00a0\u00bb)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Set f = fso.GetFile(filespec)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0ShowDateCreated = f.DateCreated<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Function<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dbc5919 elementor-widget elementor-widget-heading\" data-id=\"dbc5919\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Copy<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-84603c7 elementor-widget elementor-widget-text-editor\" data-id=\"84603c7\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><b>Description<\/b>: Copie un fichier ou un dossier sp\u00e9cifi\u00e9 d&rsquo;un emplacement vers un autre.<br \/><b>Notes<\/b>: Le r\u00e9sultat de la m\u00e9thode Copy sur un objet File ou Folder est identique \u00e0 celui de FileSystemObject.CopyFile ou FileSystemObject.CopyFolder o\u00f9 le fichier ou le dossier r\u00e9f\u00e9renc\u00e9s par object est pass\u00e9 en argument. Notez cependant que ces m\u00e9thodes alternatives sont capables de copier plusieurs fichiers ou dossiers.<\/p><p><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 Set fso = CreateObject(\u00ab\u00a0Scripting.FileSystemObject\u00a0\u00bb)<br \/>\u00a0\u00a0 \u00a0Set a = fso.CreateTextFile(\u00ab\u00a0c:.txt\u00a0\u00bb, True)<br \/>\u00a0\u00a0 \u00a0a.WriteLine(\u00ab\u00a0Ceci est un test.\u00a0\u00bb)<br \/>\u00a0\u00a0 \u00a0Set a = fso.GetFile(\u00ab\u00a0c:.txt\u00a0\u00bb)<br \/>\u00a0\u00a0 \u00a0a.Copy (\u00ab\u00a0c:.txt\u00a0\u00bb)<br \/><\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-90adc28 elementor-widget elementor-widget-heading\" data-id=\"90adc28\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Subfolders<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ecf5ace elementor-widget elementor-widget-text-editor\" data-id=\"ecf5ace\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><b>Description<\/b>: Copie un fichier ou un dossier sp\u00e9cifi\u00e9 d&rsquo;un emplacement vers un autre.<br \/><b>Notes<\/b>: Le r\u00e9sultat de la m\u00e9thode Copy sur un objet File ou Folder est identique \u00e0 celui de FileSystemObject.CopyFile ou FileSystemObject.CopyFolder o\u00f9 le fichier ou le dossier r\u00e9f\u00e9renc\u00e9s par object est pass\u00e9 en argument. Notez cependant que ces m\u00e9thodes alternatives sont capables de copier plusieurs fichiers ou dossiers.<\/p><p><span style=\"color: #0000ff;\"><em>Sub AfficheListeDossier(specdossier)<br \/>\u00a0\u00a0 \u00a0Dim fs, f, f1, s, sf<br \/>\u00a0\u00a0 \u00a0Set fs = CreateObject(\u00ab\u00a0Scripting.FileSystemObject\u00a0\u00bb)<br \/>\u00a0\u00a0 \u00a0Set f = fs.GetFolder(specdossier)<br \/>\u00a0\u00a0 \u00a0Set sf = f.SubFolders<br \/>\u00a0\u00a0 \u00a0For Each f1 in sf<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 s = s &amp; f1.name<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 s = s &amp;\u00a0 vbCrLf<br \/>\u00a0\u00a0 \u00a0Next<br \/>\u00a0\u00a0 \u00a0MsgBox s<br \/>End Sub <br \/><\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6589362 elementor-widget elementor-widget-heading\" data-id=\"6589362\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Explorer tous les sous-dossiers<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-85c6272 elementor-widget elementor-widget-text-editor\" data-id=\"85c6272\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Dans les r\u00e9f\u00e9rences du projet, ajouter<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-33119f3 elementor-widget elementor-widget-image\" data-id=\"33119f3\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"572\" height=\"237\" src=\"https:\/\/lesmrdtrucs.mataf35400.fr\/wp-content\/uploads\/2022\/12\/Microsoft-Scripting-Runtime.png\" class=\"elementor-animation-grow attachment-large size-large wp-image-305\" alt=\"\" srcset=\"https:\/\/lesmrdtrucs.mataf35400.fr\/wp-content\/uploads\/2022\/12\/Microsoft-Scripting-Runtime.png 572w, https:\/\/lesmrdtrucs.mataf35400.fr\/wp-content\/uploads\/2022\/12\/Microsoft-Scripting-Runtime-300x124.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0b24441 elementor-widget elementor-widget-text-editor\" data-id=\"0b24441\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"color: #0000ff;\"><em>Sub Command1_Click()<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim fso As New FileSystemObject<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0ExploreFolder fso.GetFolder(\u00ab\u00a0D:\\Toto\u00a0\u00bb)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Sub<\/em><\/span><\/p><p><span style=\"color: #0000ff;\"><em>Sub ExploreFolder(fld As Folder)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0<span style=\"color: #339966;\">&lsquo; Interruption<\/span><\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0If toto Then Exit Sub<\/em><\/span><\/p><p><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0<span style=\"color: #339966;\">&lsquo; Affiche les fichiers dans le Debug<\/span><\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim f As File<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0For Each f In fld.Files<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0 \u00a0\u00a0\u00a0\u00a0 Debug.Print f.Name<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0 \u00a0\u00a0\u00a0\u00a0 <span style=\"color: #339966;\">&lsquo; Pour d\u00e9tecter la touche d&rsquo;arr\u00eat<\/span><\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0 \u00a0\u00a0\u00a0\u00a0 DoEvents<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Next\u00a0\u00a0\u00a0 <\/em><\/span><\/p><p><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0<span style=\"color: #339966;\">&lsquo; Traite les sous-dossiers<\/span><\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim fld1 As Folder<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0For Each fld1 In fld.SubFolders<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 ExploreFolder fld1<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Next<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Sub<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6c4c188c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6c4c188c\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-41a1f73f\" data-id=\"41a1f73f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f3b71e0 elementor-widget elementor-widget-heading\" data-id=\"f3b71e0\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">R\u00e9cup\u00e9ration de la version d'un fichier<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5c06ead9 elementor-widget elementor-widget-text-editor\" data-id=\"5c06ead9\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>J&rsquo;ai fait une appli qui utilise cette ressource: Date des fichiers.<br \/>Je suis parti de la source:<br \/><a href=\"https:\/\/codes-sources.commentcamarche.net\/source\/638-information-version-type-copyright-description-d-un-fichier-ocx-dll-ou-exe\" target=\"_blank\" rel=\"noopener\">https:\/\/codes-sources.commentcamarche.net\/source\/638-information-version-type-copyright-description-d-un-fichier-ocx-dll-ou-exe<\/a><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-32053cc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"32053cc\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-77d6491\" data-id=\"77d6491\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ad29bb3 elementor-widget elementor-widget-heading\" data-id=\"ad29bb3\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Taille utilisable de l'\u00e9cran<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cc591c2 elementor-widget elementor-widget-text-editor\" data-id=\"cc591c2\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Dans un module:<br \/><br \/><span style=\"color: #0000ff;\"><em>Public Declare Function SystemParametersInfo Lib \u00ab\u00a0user32\u00a0\u00bb Alias \u00ab\u00a0SystemParametersInfoA\u00a0\u00bb (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As RECT, \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 ByVal fuWinIni As Long) As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Public Const SPI_GETWORKAREA = 48<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>Private Type RECT<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Left As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Top As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 Right As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 Bottom As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Type<\/em><\/span><br \/><br \/><span style=\"color: #0000ff;\"><em>Public Function LargeurEcran() As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 Dim Prect As RECT<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 If SystemParametersInfo(SPI_GETWORKAREA, 0, Prect, 0) Then<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LargeurEcran = (Prect.Right &#8211; Prect.Left) * Screen.TwipsPerPixelX<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 End If<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Function<\/em><\/span><br \/><br \/><span style=\"color: #0000ff;\"><em>Public Function HauteurEcran() As Long<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 Dim Prect As RECT<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 If SystemParametersInfo(SPI_GETWORKAREA, 0, Prect, 0) Then<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 HauteurEcran = (Prect.Bottom &#8211; Prect.Top) * Screen.TwipsPerPixelY<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0 End If<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Function<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-5624713 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"5624713\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-4d23725\" data-id=\"4d23725\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7fa867f elementor-widget elementor-widget-heading\" data-id=\"7fa867f\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">R\u00e9cup\u00e9ration du nom d'un volume<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-08f1a7e elementor-widget elementor-widget-text-editor\" data-id=\"08f1a7e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"color: #0000ff;\"><em>Function RecupereLettreDisque(NomDisque As String)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Dim fs, f, f1, s<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Set fs = CreateObject(\u00ab\u00a0Scripting.FileSystemObject\u00a0\u00bb)<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Set f = fs.drives<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0For Each s In f<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 If s.isready Then<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 If s.volumeName = NomDisque Then RecupereLettreDisque = s<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 End If<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>\u00a0\u00a0 \u00a0Next<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>End Function<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-f6d4334 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f6d4334\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6504e9f\" data-id=\"6504e9f\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-13a9a6c elementor-widget elementor-widget-heading\" data-id=\"13a9a6c\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Les MRD constantes<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-af0b758 elementor-widget elementor-widget-text-editor\" data-id=\"af0b758\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><span style=\"color: #0000ff;\"><em><span style=\"color: #339966;\">&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;Les codes de couleur<\/span><br \/>Public Const MrdBlanc As Double = &amp;HFFFFFF<br \/>Public Const MrdGrisClair As Double = &amp;HC0C0C0<br \/>Public Const MrdGrisFonc\u00e9 As Long = &amp;H808080<br \/>Public Const MrdNoir As Double = &amp;H80000008<br \/>Public Const MrdJaunePale As Long = &amp;HC0FFFF<br \/>Public Const MrdJaune As Long = &amp;HFFFF&amp;<br \/>Public Const MrdSaumon As Long = &amp;HC0C0FF<br \/>Public Const MrdOrangePale As Long = &amp;HC0E0FF<br \/>Public Const MrdOrange As Double = &amp;H80FF&amp;<br \/>Public Const MrdMagenta As Double = &amp;HFF00FF<br \/>Public Const MrdRouge As Double = &amp;HFF&amp;<br \/>Public Const MrdVertPale As Long = &amp;HC0FFC0<br \/>Public Const MrdVertClair As Double = &amp;HFF00&amp;<br \/>Public Const MrdVertFonc\u00e9 As Double = &amp;HC000&amp;<br \/>Public Const MrdCyan As Double = &amp;HFFFF00<br \/>Public Const MrdBleu As Double = &amp;HFF0000<br \/><br \/><span style=\"color: #339966;\">&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;Les types de donn\u00e9es des champs de MDB<\/span><br \/><span style=\"color: #339966;\">&lsquo;for i=0 to data.Recordset.Fields.Count-1:print<\/span> data.Recordset.Fields(i).Type:next i<br \/>Public Const MrdBddNumAuto As Integer = 4<br \/>Public Const MrdBddDate As Integer = 8<br \/>Public Const MrdBddTexte As Integer = 10<br \/>Public Const MrdBddNumeric As Integer = 7<br \/><br \/><span style=\"color: #339966;\">&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;Les dur\u00e9es pour calcul de d\u00e9calage<\/span><br \/><span style=\"color: #339966;\">&lsquo;Exemple:<\/span><br \/><\/em><\/span><span style=\"color: #0000ff;\"><em>If CDbl(CDate(Now) &#8211; CDate(ficdate)) &gt; MrdUneHeure Then<br \/>Public Const MrdUnAn As Double = 365<br \/>Public Const MrdUnMois As Double = 31<br \/>Public Const MrdUneSemaine As Double = 7<br \/>Public Const MrdUnJour As Double = 1<br \/>Public Const MrdUneHeure As Double = 4.16666666715173E-02<br \/>Public Const MrdUneMinute As Double = 6.94444439432118E-04<br \/>Public Const MrdUneSeconde As Double = 1.15740695036948E-05<br \/><br \/><span style=\"color: #339966;\">&lsquo;&#8212;&#8212;&#8212;&#8212;&#8212;Les codes de touches (keycode)<\/span><br \/>Public Const MrdKeycodeBackSpace As Integer = 8<br \/>Public Const MrdKeycodeTab As Integer = 9<br \/>Public Const MrdKeycodeMaj As Integer = 16<br \/>Public Const MrdKeycodeCtrl As Integer = 17<br \/>Public Const MrdKeycodeAlt As Integer = 18<br \/>Public Const MrdKeycodeEsc As Integer = 27<br \/>Public Const MrdKeycodeSpace As Integer = 32<br \/>Public Const MrdKeycodePageUp As Integer = 33<br \/>Public Const MrdKeycodePageDown As Integer = 34<br \/>Public Const MrdKeycodeEnd As Integer = 35<br \/>Public Const MrdKeycodeHome As Integer = 36<br \/>Public Const MrdKeycodeLeft As Integer = 37<br \/>Public Const MrdKeycodeUp As Integer = 38<br \/>Public Const MrdKeycodeRight As Integer = 39<br \/>Public Const MrdKeycodeDown As Integer = 40<br \/>Public Const MrdKeycodeIns As Integer = 45<br \/>Public Const MrdKeycodeDel As Integer = 46<br \/>Public Const MrdKeycodeWin As Integer = 92<br \/>Public Const MrdKeycodeF1 As Integer = 112 <\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-63fa8b7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"63fa8b7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2f5b0b4\" data-id=\"2f5b0b4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6f16f84 elementor-widget elementor-widget-heading\" data-id=\"6f16f84\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Mettre une liste de valeurs en tableau<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5bebebc elementor-widget elementor-widget-text-editor\" data-id=\"5bebebc\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Cette MRD fonction sert \u00e0 transformer une liste de valeurs en un tableau variant. Le nombre d&rsquo;\u00e9l\u00e9ments de la liste est quelconque.<span style=\"color: #0000ff;\"><em><br \/><br \/>Function MetValeursEnTableau(ParamArray MesValeurs()) As Variant<br \/>\u00a0\u00a0 \u00a0Dim Toto()<br \/>\u00a0\u00a0 \u00a0ReDim Toto(0)<br \/>\u00a0\u00a0 \u00a0Dim Index As Integer<br \/>\u00a0\u00a0 \u00a0For Each X In MesValeurs<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 ReDim Preserve Toto(Index)<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 Toto(Index) = X<br \/>\u00a0\u00a0 \u00a0\u00a0\u00a0\u00a0 Inc Index<br \/>\u00a0\u00a0 \u00a0Next X<br \/>\u00a0\u00a0 \u00a0MetValeursEnTableau = Toto<br \/>End Function<br \/><br \/><\/em><\/span>Elle s&rsquo;utilise de la sorte:<span style=\"color: #0000ff;\"><em><br \/><br \/>\u00a0\u00a0 \u00a0Dim Toto as Variant<br \/>\u00a0\u00a0 \u00a0Toto = MetValeursEnTableau(\u00ab\u00a0Riri\u00a0\u00bb, \u00ab\u00a0Fifi\u00a0\u00bb, \u00ab\u00a0Loulou\u00a0\u00bb)<br \/><br \/><\/em><\/span>Dans l&rsquo;exemple pr\u00e9c\u00e9dent, on r\u00e9cup\u00e8re:<span style=\"color: #0000ff;\"><em><br \/><br \/>\u00a0\u00a0 \u00a0Toto(0)=\u00a0\u00bbRiri\u00a0\u00bb<br \/>\u00a0\u00a0 \u00a0Toto(1)=\u00a0\u00bbFifi\u00a0\u00bb<br \/>\u00a0\u00a0 \u00a0Toto(2)=\u00a0\u00bbLoulou\u00a0\u00bb <\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3c6c69b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3c6c69b\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-82f4e94\" data-id=\"82f4e94\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-67eb046 elementor-widget elementor-widget-heading\" data-id=\"67eb046\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">DateAdd<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8b18eb0 elementor-widget elementor-widget-text-editor\" data-id=\"8b18eb0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Permet d&rsquo;ajouter ou retirer des temps \u00e0 une date\/heure donn\u00e9e.<br \/>Ex:<br \/><span style=\"color: #339966;\"><em>&lsquo;ajoute un mois \u00e0 l&rsquo;instant pr\u00e9sent.<\/em><\/span><br \/><span style=\"color: #0000ff;\"><em>DateAdd(\u00ab\u00a0m\u00a0\u00bb, 1, now)<\/em><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e2cffa7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e2cffa7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-66f8431\" data-id=\"66f8431\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a7342d elementor-widget elementor-widget-heading\" data-id=\"5a7342d\" data-element_type=\"widget\" data-settings=\"{&quot;_animation&quot;:&quot;none&quot;}\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">ExitWindowsEx<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4284713 elementor-widget elementor-widget-text-editor\" data-id=\"4284713\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p><em>Sert \u00e0 arr\u00eater le PC. J&rsquo;ai cr\u00e9\u00e9 un programme qui se sert de cette fonction: ExtinctionPc.exe<\/em><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>File Scripting Object Files Description: Donne acc\u00e8s aux propri\u00e9t\u00e9s d&rsquo;un fichier.Note: Le code suivant illustre l&rsquo;obtention d&rsquo;un objet File et l&rsquo;affichage d&rsquo;une de ses propri\u00e9t\u00e9s.Function ShowDateCreated(filespec)\u00a0\u00a0 \u00a0Dim fso, f\u00a0\u00a0 \u00a0Set fso = CreateObject(\u00ab\u00a0Scripting.FileSystemObject\u00a0\u00bb)\u00a0\u00a0 \u00a0Set f = fso.GetFile(filespec)\u00a0\u00a0 \u00a0ShowDateCreated = f.DateCreatedEnd Function Copy Description: Copie un fichier ou un dossier sp\u00e9cifi\u00e9 d&rsquo;un emplacement vers un autre.Notes: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"","ocean_second_sidebar":"","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"","ocean_custom_header_template":"","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"","ocean_menu_typo_font_family":"","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"","footnotes":""},"class_list":["post-299","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/299","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/comments?post=299"}],"version-history":[{"count":19,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/299\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/pages\/299\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/lesmrdtrucs.mataf35400.fr\/index.php\/wp-json\/wp\/v2\/media?parent=299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}