View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Create and write a simple text file in Excel/VBA

Hi Thomas,

From Help

FileNumber = FreeFile
Open "C:\My Documents\TEST10" For Output As #FileNumber
Write #FileNumber, "This is a sample."
Close #FileNumber

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Thomas Wieser" <wernze.nospam@gmx_net wrote in message
y.telekom.at...
Hi,

what is the easiest way to create a new text file, write one string into
the file and close it afterwards?


Regards, Thomas