Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a txt file
HI
On the below code I would like to add a variable that uses the value of a text box from a form: So the form is AABB the text box is NAME I have tried to change the code below to Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME &".txt", True) but it does not work coul you please help? Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\GL1025\testfile.txt", True) For Each Cell In Range("A1:A65000") s = Cell.Value a.WriteLine (s) Next a.Close End Sub |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a txt file
There appears to be a typo :
Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME &".txt", True) Set a = fs.CreateTextFile("c:\GL1025\" & ABB.NAME & ".txt", True) try specifing the text propery: Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME.TEXT &".txt", True) -- HTHs Martin "diacci1st" wrote: HI On the below code I would like to add a variable that uses the value of a text box from a form: So the form is AABB the text box is NAME I have tried to change the code below to Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME &".txt", True) but it does not work coul you please help? Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\GL1025\testfile.txt", True) For Each Cell In Range("A1:A65000") s = Cell.Value a.WriteLine (s) Next a.Close End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a txt file
I do not believe that there is.
You probably have to either manually insert them or delete the hidden ones. -- HTHs Martin "diacci1st" wrote: HI On the below code I would like to add a variable that uses the value of a text box from a form: So the form is AABB the text box is NAME I have tried to change the code below to Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME &".txt", True) but it does not work coul you please help? Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\GL1025\testfile.txt", True) For Each Cell In Range("A1:A65000") s = Cell.Value a.WriteLine (s) Next a.Close End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving a txt file
Hi ..
Some issus. One place you write AABB and in the code you write ABB ("c:\GL1025\& ABB.NAME &".txt", you should add one " ("c:\GL1025\" & ABB.NAME &".txt", diacci1st skrev: HI On the below code I would like to add a variable that uses the value of a text box from a form: So the form is AABB the text box is NAME I have tried to change the code below to Set a = fs.CreateTextFile("c:\GL1025\& ABB.NAME &".txt", True) but it does not work coul you please help? Set fs = CreateObject("Scripting.FileSystemObject") Set a = fs.CreateTextFile("c:\GL1025\testfile.txt", True) For Each Cell In Range("A1:A65000") s = Cell.Value a.WriteLine (s) Next a.Close End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving Excel 2007 file in 2003 creates very large file | Excel Discussion (Misc queries) | |||
Text file saving, setting file origin | Excel Discussion (Misc queries) | |||
Saving multi-tab excel file created from comma delimited text file | Excel Programming | |||
How do I stop Excel 2000 from saving file history from file that . | Excel Discussion (Misc queries) | |||
saving an excel file as an ASCII text file without delimiters | Excel Programming |