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
| Option Explicit
'
' Fonction MajMesure , génére un fichier Html..
'Pour afficher la mesure donnée en paramétre..
Sub MaJMesure(MaMesure As String)
Dim f As Integer
f = FreeFile
Open "c:\temp\Mafeuille.html" For Output Shared As #f
Print #f, "<html>"
Print #f, "<META http-equiv=""Refresh"" content=""10"">" ' Une ligne pour mise à jour page htlm toute les 10secondes
Print #f, "<body>"
Print #f, MaMesure
Print #f, "</body>"
Print #f, "</html>"
Close f
End Sub
'
'Procedure de test...
'
Sub test()
MaJMesure (Now) 'N 'ayant pas de mesure de temperature j'affiche la date..
DoEvents
Application.OnTime Now + TimeValue("00:00:10"), "test" ' Relance test dans 10s
Debug.Print Now 'Voir fenêtre exécution
End Sub |
Partager