Try something like the following:
Dim FName As String
Dim Ndx As Long
FName = "H:\Test\test.txt" '<< CHANGE
Open FName For Output As #1
For Ndx = 1 To 10
Print #1, Ndx
Next Ndx
Close #1
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Acube"
wrote in message
...
Hi, Can we programme excel to create a Text file in the folder
using
VBA? For example: I want to programme VBA to create a file call
Mysave.txt inside one of the folder? Can that be done?? Pls
help me...
Thanks alot..
--
Acube
------------------------------------------------------------------------
Acube's Profile:
http://www.excelforum.com/member.php...o&userid=29734
View this thread:
http://www.excelforum.com/showthread...hreadid=494451