Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default merging excel files in different sheets

Dear Friends,

I have 2 excel files (maybe more) sefor_1 & sefor_2 with 65500 row
each.
I want to copy the contents of sefor_2 in a second sheet of sefor_1.
Using the following code:

' while having the sefor_2 activated
Cells.Copy
Windows("sefor_1").Activate
ActiveWorkbook.Sheets.Add
ActiveSheet.Paste
Sheets("Sheet1").Name = "sefor_2"
Application.CutCopyMode = False

it corrupts at:
Windows("sefor_1").Activate

Any ideas how to overcome this?

Thanks,
G

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default merging excel files in different sheets

How about:

Worksheets(Name of the worksheet to be copied from Sefor_2).Cop
after:=WorkBooks("Sefor_1").Sheets(Name of worksheet in Sefor_1)

This should copy the wanted sheet in sefor_2 right after the sheet i
Sefor_1 as a new Sheet.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default merging excel files in different sheets

How about:

Worksheets(Name of the worksheet to be copied from Sefor_2).Cop
after:=WorkBooks("Sefor_1").Sheets(Name of worksheet in Sefor_1)

This should copy the wanted sheet in sefor_2 right after the sheet i
Sefor_1 as a new Sheet.

Best Regards

Noo

--
Message posted from http://www.ExcelForum.com

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
merging excel files A.A.A Excel Discussion (Misc queries) 3 September 3rd 08 02:23 PM
merging 2 excel sheets JenJen[_2_] Excel Worksheet Functions 0 January 10th 08 07:02 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 12:17 AM.

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"