Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default open .txt file

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...
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default open .txt file

Take a look at these examples:

http://www.erlandsendata.no/english/...hp?t=envbatext

Mike F
"Ranjit kurian" wrote in message
...
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...



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default open .txt file

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

"Ranjit kurian" a écrit dans le
message de ...
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...


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default open .txt file

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..

"Jacques ALARDET" wrote:

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

"Ranjit kurian" a écrit dans le
message de ...
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...



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. Phillip Pi Setting up and Configuration of Excel 0 April 23rd 09 08:53 PM
In Excel - Use Windows Explorer instead of File Open to open file KymY Excel Discussion (Misc queries) 1 August 5th 06 09:59 PM
Open a file do a macro ( made) and open next succesive file SVTman74 Excel Programming 5 April 21st 06 10:14 PM
Open File or Switch Between Windows if File is Open Ricky Pang Excel Programming 2 July 8th 05 05:51 AM
Open File or Switch Between Windows if File is Open Ricky Pang Excel Programming 0 July 2nd 05 08:41 PM


All times are GMT +1. The time now is 11:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"