View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_3_] Dick Kusleika[_3_] is offline
external usenet poster
 
Posts: 599
Default Exporting to Notepad

Adam

Here's a little easier macro to follow - not as powerful, but for your
specific request, it gets the job done.

Sub Col1ToText()

'copy sheet1 into a new workbook
ThisWorkbook.Sheets(1).Copy

'The new workbook will be active
With ActiveWorkbook

'Delete all the columns but one
.Sheets(1).Columns("B:IV").Delete

'Save the new workbook as text
.SaveAs "C:\Dick\MyCol1.txt", xlTextWindows

'Close the new workbook with no prompt
.Close False
End With

End Sub
--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"Adam Kozul" wrote in message
...
I am trying to get excel to export a column to a .txt file is there any

way that I can do this so that later on I can refrence this file later on.
I know I can copy and paste the colmun but I was hoping that there was a way
that I could export it...

Thanks

Adam Kozul