-
I'm trying to create a program that with the change of the date, a new text field or wordpad document opens so that i can enter and save new text for that date.
I'm currently using DTPicker, and ole with a wordpad document. But so far I've been unsuccesfull.
Will this work?
If not, what would be the easiest way to accomplish this?
example:
today is the 11th. i want a new text document for today to open so that i can save info about today on it.
tomorrow will be the 12th. so when i go to the 12th, i want a new text document to open for the 12th so that i can make notes for that day and so on.
-
I use DTPicker before, it is straight forward, but I don't understand your question, please give more detail
Regards,
TheBao
-
Code:
Dim fso As FileSystemObject
Dim strFileName As String
Set fso = New FileSystemObject
strFileName = Format(DTPicker1.Value, "mmddyy") & ".txt"
If fso.FileExists(App.Path & "\Data\" & strFileName) Then
'add code to open existing text file
Else
'add code to create new text file
End If
Hope that helps,
Richard