Imports System.IO Dim filename As String = "c:\path\to\file.txt" File.WriteAllText(filename, "Text to write" & vbCrLf)