View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default VBA - saving strings to a text file

Try code like the following to get started:

Dim FName As String
Dim FNum As Integer
Dim S As String

FName = "C:\Test\TestFile.txt"
FNum = FreeFile
S = "Write This"
Open FName For Output Access Write As #FNum
Print #FNum, S
Close #FNum


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)


"JohnJ" wrote in message
...
Is there any Excel VBA code to save strings to a text file?