How to print current data and time to text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All
Any body can guide me How to print current data and time to text file in Visual Basic..

Regard
Dayanand
 
Are you looking for somethig like this?

Sub test()
Dim ff As Integer, timDat As String
ff = FreeFile
Open "c:\test.txt" For Append As ff
timDat = Format(Now, "dd mmm yyyy, hh:mm:ss")
Print #ff, timDat
Close ff
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top