>Is there a command to write the name of the VB file (for instance) to a text file?
>ie. give name of file that is currently running to a text file without manually having to have that name within the file.
>
>Confused? Please can someone help.... :|
Here is an example of using FileSystemObject to write text into a file:
Dim FSO as Object, objLogFile as Object
Set FSO = CreateObject("Scripting.FileSystemObject")
if not FSO.FileExists("C:\Backup.log") then
FSO.CreateTextFile("C:\Backup.log")
end if
Set objLogFile = FSO.OpenTextFile("C:\Backup.log",8)
objLogFile.WriteLine ("Backup finished at " & Now() & ". ")
objLogFile.Close
Set FSO = Nothing
Set objLogFile = Nothing
Here is the link on FileSystemObject:
http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/vbasic/vbcon98/vbconintroductiontofilesystemobjectmodel.htmHTH,
Igor Gelin
Database Developer