LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.misc
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.



 
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
Macro for importing text files but the file name changes CHARI Excel Worksheet Functions 3 February 27th 09 08:31 PM
merging excel files A.A.A Excel Discussion (Misc queries) 3 September 3rd 08 02:23 PM
Merging 800 Excel files Kjetil[_2_] Excel Discussion (Misc queries) 1 May 3rd 07 03:56 PM
Merging Different excel files into one Neill Excel Discussion (Misc queries) 0 October 27th 05 09:15 PM
merging my excel files Donna YaWanna Excel Discussion (Misc queries) 1 June 14th 05 12:53 AM


All times are GMT +1. The time now is 02:30 PM.

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

About Us

"It's about Microsoft Excel"