VBA and text files

youngda

Board Regular
Joined
Jun 13, 2006
Messages
81
I have a rather odd problem: I need to take a range of cells and paste it in a text document. After I paste the first range, I need to be able to paste similar ranges to that same text document on the line AFTER my previous pastes. If possible (or if necessary), I'd also like this to automatically save this text file as a preset filename.

Is it possible to work in this way with a txt? I have already written a similar function that performs the same thing for a CSV file, so I have those basics down, but before I get too deep in the Text file function I'd like to know if VBA even supports such a function.
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Watch MrExcel Video

Forum statistics

Threads
1,119,170
Messages
5,576,518
Members
412,730
Latest member
Thundereagle
Top