LuckyDuck528
Programmer
Hello,
This will probably be easy for some of you seasoned coders but I am still quite new at working w/ VB and could use some help figuring out my problem.
I have a file that is created the first time this program is run and everytime after that it is just appended to.
The problem is, my code doesn't append. I get an error and the .exe program quits.
Also, does anyone know how I can separate my values with a ","? I would like to be able to open this comma delimited file in excel at a later time.
Thank you for your help. It is sincerely appreciated. Have a great day!
This will probably be easy for some of you seasoned coders but I am still quite new at working w/ VB and could use some help figuring out my problem.
I have a file that is created the first time this program is run and everytime after that it is just appended to.
The problem is, my code doesn't append. I get an error and the .exe program quits.
Also, does anyone know how I can separate my values with a ","? I would like to be able to open this comma delimited file in excel at a later time.
Thank you for your help. It is sincerely appreciated. Have a great day!
Code:
Const strMasterLogFile = "D:\data\temp_files\deploy\archive\MasterLogFile.txt"
(..other code...)
If objFSO.FileExists(strMasterLogFile) Then
Open strMasterLogFile For Append As #10
Print #10, strServerName; strUsername; strFileName; strFilePath; strComments
Close #10
Else
Open strMasterLogFile For Output As #10
Print #10, "Server,User Name,File Name,Path,Comments"
Print #10, strServerName; strUsername; strFileName; strFilePath; strComments
Close #10
End If
(more code...)