Contatore accessi RUN visual basic




Private Sub ContaAvvio()
Dim Conta As Long
Dim I As String
Dim Stringa As String

If Dir(App.Path & "\RunAvvio.log") = "" Then
Open App.Path & "\RunAvvio.log" For Output As #7
Print #7, 1 & "|" & Date
Close #7
Else
Open App.Path & "\RunAvvio.log" For Input As #7
Line Input #7, Stringa
I = InStr(Stringa, "|")
Conta = Mid(Stringa, 1, I - 1)

Close #7
Open App.Path & "\RunAvvio.log" For Output As #7
Conta = Conta + 1
Print #7, Conta & "|" & Date

Close #7


End If


Menu.Caption = "Creazione Report in codice Vb6 - Avviato n. " & Conta & " volte"

End Sub










( contatoreaccessirunvisualbasic.html )- by Paolo Puglisi - Modifica del 17/12/2023