Hi!
Is it possible to make a workbook create a .txt file containing the value of a certain cell?
I would like to make this happen and for the .txt file to be placed in the same folder as the workbook.
Hi!
Is it possible to make a workbook create a .txt file containing the value of a certain cell?
I would like to make this happen and for the .txt file to be placed in the same folder as the workbook.
[VBA]Sub Test()
Dim ff As Integer, sDir1 As String, sFN1 As String
Range("A1").Value = "Hello World!"
sDir1 = ThisWorkbook.Path & "\"
sFN1 = "Test.txt"
ff = FreeFile
Open sDir1 & sFN1 For Output As #ff
Print #ff, Range("A1").Value
Close #ff
Shell "Notepad.exe " & sDir1 & sFN1
End Sub[/VBA]
This was exaxtly how I meant.
Thank you Kenneth!
Rejje