Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

export range to a txt or csv file??

Status
Not open for further replies.

peach255

Programmer
Jan 20, 2003
29
US
How can I export only Column A & B of this worksheet to a
txt or .csv file?

I have the following code so far, and it is not working:
Set ExpRange = Columns("A:B")
ExpRange.Select
With CSVFile
.ExportRange = ActiveCell.RangeSelection
.Export CSVFilename:="C:\textfile.csv"
End With

thank you!

 
Thanks for your help. However, I prefer not to do "Save as" b/c then this would rename the current file open and cause some confusion. I would like to just export the Columns A & B to a txt file. Is there a way to do this? thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top