0

Does any one know why the

  .writeblanklines 3 

does not work? I've tried plenty of different ways and it always seems to just overwrite the line in the textfile.

    Private Sub CommandButton3_Click()

Dim fso As FileSystemObject
Set fso = CreateObject("Scripting.FileSystemObject")
Dim fsofolder As Folder
Set fsofolder = fso.GetFolder("U:\files")
Dim file1 As file
Dim a As Integer

Dim b As String
b = "U:\files\" & ListBox1.Value

fso.OpenTextFile(b, ForWriting).WriteBlankLines 3
fso.OpenTextFile(b, ForWriting).WriteLine (TextBox3.Value)
Lewis Morris
  • 1,916
  • 2
  • 28
  • 39

1 Answers1

0

See: http://msdn.microsoft.com/en-us/library/aa265347(v=vs.60).aspx

If you want to append content, then use ForAppending when opening the file.

Tim Williams
  • 154,628
  • 8
  • 97
  • 125