View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Matrix[_2_] Matrix[_2_] is offline
external usenet poster
 
Posts: 4
Default Export values in a text file

On Sat, 1 Nov 2003 11:48:27 -0500, "Tom Ogilvy"
wrote:

You can get sample code he
http://support.microsoft.com/support...eio/fileio.asp
File Access with Visual Basic® for Applications



Thanks for support.
I've written this code, but it doesn't work.
Can you tell me why?


Sub Worksheet_Change(ByVal Target As Range)


If Target.Value = Foglio2.Range("D9").Value Then MyTxtFile

End Sub


Sub MyTxtFile()
Const Percorso = "c:\txtExport.txt"

Open Percorso For Append As #1
Print #1, Date, Time, Cells(9, 4).Value
Close #1

End Sub