Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hello

 

I'm not sure I understand the first three questions. Can you please explain a bit more in detail?

 

I can not see where _fileName is declared and which value it has. Error message says it is of type object, should be a string. If you want to append to your textfile like in a logfile, here's an alternative way:

 

Imports System.IO

Dim strFile As String = "C:\Temp\Log.txt"
Dim sw As StreamWriter
Try
   If (Not File.Exists(strFile)) Then
      sw = File.CreateText(strFile)
   Else
      sw = File.AppendText(strFile)
   End If
   sw.WriteLine("%%% PLACE YOUR LOG MESSAGE HERE %%%")
   sw.Close()
Catch ex As IOException
   MsgBox("Error writing to log file.")
End Try

 


R. Krieg
RKW Solutions
www.rkw-solutions.com