View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
JBeaucaire[_90_] JBeaucaire[_90_] is offline
external usenet poster
 
Posts: 222
Default Importing and merging Excel files by using a macro

Well, that's doable, just add these three lines of code at the bottom. It
will delete next to last sheet in the book, which should be the last sheet
you imported, right?

==========
Application.DisplayAlerts = False
TheBook.Sheets(TheBook.Sheets.Count - 1).Delete
Application.DisplayAlerts = True
==========

Does this help?

Your feedback is appreciated, click YES if this post helped you.


"ericlbt" wrote:

Hi,
Thank you very much.
The macro is working very well.

It would be perfect if the imported file/sheet could replace the old one and
not be added to the existing ones.
04.04.09 - one sheet
04.05.09 - one sheet after the 04.04.09 one
What I would love:
04.05.09 - one sheet (no more 04.04.09)

Thank you.

Have a nice day.