Horje
vba write text file Code Example
excel vba write string to text file
'VBA function to write string to text file:

Function SaveStringAsTextFile$(s$, fName$)
    Const adSaveCreateOverWrite = 2
    With CreateObject("ADODB.Stream")
        .Charset = "utf-8"
        .Open
        .WriteText s
        .SaveToFile fName, adSaveCreateOverWrite
    End With
End Function
vba write text file
Open ThisWorkbook.Path & "\log.txt" For Append As #1
Write #1, "Here is my text."
Write #1, "Another line."
Close #1




Vb

Related
add control vb Code Example add control vb Code Example
excel vba folder exist Code Example excel vba folder exist Code Example
vb.net get name by Cell Click Code Example vb.net get name by Cell Click Code Example
how to check is the value enterd is a number or text in vba Code Example how to check is the value enterd is a number or text in vba Code Example
vba ado ace sql alias ignored for calculated column Code Example vba ado ace sql alias ignored for calculated column Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7