Option Strict On Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Using writer As New streamWriter("C:\Users\Reopopopopkpppopopop\Documents\Visual Studio 2008\Projects\WindowsApplication22\WindowsApplication22\TextFile1.txt") writer.Write("test") End Using End Sub End Class