Click here to Skip to main content
15,896,111 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Convert code from C# to VB Pin
Code1089-Sep-08 11:15
Code1089-Sep-08 11:15 
GeneralRe: Convert code from C# to VB Pin
Wendelius9-Sep-08 11:29
mentorWendelius9-Sep-08 11:29 
GeneralRe: Convert code from C# to VB Pin
Daniel Grunwald10-Sep-08 2:52
Daniel Grunwald10-Sep-08 2:52 
AnswerRe: Convert code from C# to VB Pin
Paul Conrad9-Sep-08 11:50
professionalPaul Conrad9-Sep-08 11:50 
QuestionFile IO Pin
Hetkeval9-Sep-08 8:58
Hetkeval9-Sep-08 8:58 
AnswerRe: File IO Pin
Wendelius9-Sep-08 9:18
mentorWendelius9-Sep-08 9:18 
GeneralRe: File IO Pin
Hetkeval9-Sep-08 10:17
Hetkeval9-Sep-08 10:17 
GeneralRe: File IO Pin
Wendelius9-Sep-08 10:28
mentorWendelius9-Sep-08 10:28 
What I meant is that the documentation for AppendText says:
Remarks:
This method is equivalent to the StreamWriter(String, Boolean) constructor overload. If the file specified by path does not exist, it is created. If the file does exist, write operations to the StreamWriter append text to the file


So you don't need to create the file. The following code is enough:
Dim ObjFile As StreamWriter
ObjFile = File.AppendText(strFileName) <------- File is created if necessary
ObjFile.WriteLine(Now() & "---" & strStatus & "---"&strErrMsg)
ObjFile.Flush()
ObjFile.Close()


Did this get the problem solved?

Mika
GeneralRe: File IO Pin
Hetkeval9-Sep-08 11:35
Hetkeval9-Sep-08 11:35 
GeneralRe: File IO Pin
Wendelius9-Sep-08 11:43
mentorWendelius9-Sep-08 11:43 
QuestionExcel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 8:50
DrukenProgrammer9-Sep-08 8:50 
AnswerRe: Excel Data to Sql Database Pin
dan!sh 9-Sep-08 9:07
professional dan!sh 9-Sep-08 9:07 
GeneralRe: Excel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 9:11
DrukenProgrammer9-Sep-08 9:11 
AnswerRe: Excel Data to Sql Database Pin
Wendelius9-Sep-08 9:21
mentorWendelius9-Sep-08 9:21 
GeneralRe: Excel Data to Sql Database Pin
DrukenProgrammer9-Sep-08 9:31
DrukenProgrammer9-Sep-08 9:31 
GeneralRe: Excel Data to Sql Database Pin
Wendelius9-Sep-08 9:36
mentorWendelius9-Sep-08 9:36 
Question[Message Deleted] Pin
Rafone9-Sep-08 6:51
Rafone9-Sep-08 6:51 
AnswerRe: Arrays in VB Pin
Gregory Gadow9-Sep-08 7:41
Gregory Gadow9-Sep-08 7:41 
AnswerRe: Arrays in VB Pin
Rafone9-Sep-08 8:35
Rafone9-Sep-08 8:35 
GeneralRe: Arrays in VB Pin
Gregory Gadow9-Sep-08 12:03
Gregory Gadow9-Sep-08 12:03 
AnswerRe: Arrays in VB Pin
Rafone9-Sep-08 12:03
Rafone9-Sep-08 12:03 
QuestionImporting XLS file to DataTable Pin
Codemonkey859-Sep-08 5:10
Codemonkey859-Sep-08 5:10 
AnswerRe: Importing XLS file to DataTable Pin
dan!sh 9-Sep-08 5:30
professional dan!sh 9-Sep-08 5:30 
GeneralRe: Importing XLS file to DataTable Pin
Codemonkey859-Sep-08 5:36
Codemonkey859-Sep-08 5:36 
GeneralRe: Importing XLS file to DataTable Pin
dan!sh 9-Sep-08 5:48
professional dan!sh 9-Sep-08 5:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.