excel - vba macro to create .txt list of filepaths -
i have macro list out files in subfolders of particular folder. want create .txt file in main folder has list of filepaths? macro create txt file lists column of excel spreadsheet. know easy without vba(you save text file) need find way automate it?!
if have data in column a then:
sub mkfile() dim n long, long n = cells(rows.count, "a").end(xlup).row close #1 open "c:\testfolder\testfile.txt" output #1 = 1 n print #1, cells(i, "a").value next close #1 end sub
change folder or file names suit needs.
Comments
Post a Comment