I would like to create a macro to export a named range in Excel to a tab
seperated text file, can anyone assist please ?
I would like to create a macro to export a named range in Excel to a tab
seperated text file, can anyone assist please ?
Sub ABC()
Dim bk as Workbook, bk1 as Workbook
Set bk = ActiveWorkbook
Set bk1 = Workbooks.Add(xlWBATWorksheet)
bk.Names("MyRange").Copy bk1.Worksheets(1).Range("A1")
bk1.SaveAs Filename:="C:\Data\MyFile.txt", _
FileFormat:=xlText, CreateBackup:=False
bk1.close SaveChanges:=False
End Sub
--
Regards,
Tom Ogilvy
"Peter Kamau" <[email protected]> wrote in message
news:[email protected]...
> I would like to create a macro to export a named range in Excel to a tab
> seperated text file, can anyone assist please ?
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks