Reading contents of text file into the very same existing sheet!

  • Thread starter Thread starter aiyer
  • Start date Start date
A

aiyer

Hello all!

Well, I wrote a macro that enables the user to browse and select a text
file called 'area.txt' and then append it to the existing sheet
(vtec.xls) in the workbook. The macro is invoked through a button that
exists in an existing worksheet called 'vtec.xls'. But at the moment,
the macro goes on creating copies of the 'area.txt' file each time it
is being executed. I.e., it is just appending the newly read text file
into the existing sheet/sheets of the workbook. I would like the macro
to replace the existing 'vtec.xls' file each time it is executed, so
that it will have the latest values of the 'area.txt' file being
read-in.However we need to retain the existing macro buttons in the
'vtec.xls' sheet.
It is just that the contents should get updated with the contents of
the just read 'area.txt' file. 'Area.txt' file typically has the serial
no:, the area no: and node numbers in it".
I am attaching the macro along with this.

I look forward to your help and would appreciate that.

Thanks a lot guys.

Arun.......

Attachment filename: sample macro.txt
Download attachment: http://www.excelforum.com/attachment.php?postid=476465
 
Back
Top