open .txt file

R

Ranjit kurian

Hi

I need a excel macro code to open my existing txt file(test.txt), i have
saved test.txt in c: drive, my macro should open test.txt fiile then it
should copy the Book1.xls data to test.txt file...
 
J

Jacques ALARDET

Hello Ranjit,

You modify this code

Open "test.txt" for Ouput as #1
For L = 1 to 100
Print Cells(L,1).value
Next
Close #1

J a c q u e s
 
R

Ranjit kurian

Hi Jacques,

Thanks for the code...

The first line of your code is not working for me
"Open "Todays.txt" for Ouput as #1" is in red colour.

Actually i need my test.txt to be opened in one window and in other window
my book1.xls will be opened and it should copy the book1.xls data to test.txt
file..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top