Attachment 98455
Code:
Private Sub createfile()
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
Dim oRead As System.IO.StreamReader
fileName = DateTime.Now.Year & "_" & DateTime.Now.Month & "_" & DateTime.Now.Day & "_" & _
DateTime.Now.Hour & "-" & DateTime.Now.Minute & "-" & DateTime.Now.Second & _
".txt"
MsgBox(filePath & fileName)
oWrite = oFile.CreateText(filePath & fileName)
oWrite.Close()
End Sub
Private Sub writeToFile(ByVal keys As String)
Dim oFile As System.IO.File
Dim oWrite As System.IO.StreamWriter
Dim oRead As System.IO.StreamReader
oRead = oFile.OpenText(filePath & fileName)
oWrite.WriteLine(keys)
oWrite.Close()
End Sub