I am trying to write code in VBA that will copy a range of cells. This I have done successfully but got stuck on the next step. This is the first part:
Range("L1", Range("L1").End(xlDown)).Select
Selection.Copy
Next, I would like the macro to open a new text file (.txt) with the specified name from the excel tab and insert the copied cells.
How do I open a text file?
Thank you
With your column L data in the first tab, try:
Here is one of many possible references (via Google): http://www.homeandlearn.org/write_to_a_text_file.html
Here is the example they give - you're better reading the article and then adapting to your scenario: