CodeItBetter Programming Another VB Programming Blog

How to Insert a string of text in a file

Posted on January 4, 2009
1
2
3
4
5
6
7
8
'Text File Handling - How to Insert a string of text in a file
Private Sub insertString(ByVal strFile As String, ByVal writePosition As Long, _
    ByVal strStringOfText As String)
    Dim strBuff As String: strBuff = returnContents(strFile)
    Open strFile For Output As #1
    Print #1, Left(strBuff, writePosition) & strStringOfText & Mid(strBuff, writePosition)
    Close #1
End Sub
Comments (1) Trackbacks (0)
  1. returncontents not defined
    thanks


Reply

( Cancel )

 

No trackbacks yet.