Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default copy content of 1 sheet to another one.

Hi,

I use VBA and excel 2003. I would like via VBA, copy the content of 1 sheet in
the file "test.xls" to a sheet in the file "filedesti.xls".

I tried :

workbook("test.xls").sheet(1).copy workbook("filedesti.xls").sheet(1)

but it does not work correctly.
suddenly, my CPU is used a 100% and Excel process use more than 182 Mb of memory
for this task, whereas my file "test.xls" is no more than 4.4 Mb.

could you help me please ?
thanks a lot,
maileen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default copy content of 1 sheet to another one.

Hi,

Make a small change in your code as follows and try again

Workbooks("test").Worksheets("Sheet1").Copy
After:=Workbooks("filedesti").Worksheets("sheet3")


Please ensure that both the files "test.xls" and "filedesti.xls" are open
when executing the code and there should be "Sheet1" in "test.xls" and also
there should be "Sheet3" in "test.xls".

With regards
NAVEEN


"Maileen" wrote:

Hi,

I use VBA and excel 2003. I would like via VBA, copy the content of 1 sheet in
the file "test.xls" to a sheet in the file "filedesti.xls".

I tried :

workbook("test.xls").sheet(1).copy workbook("filedesti.xls").sheet(1)

but it does not work correctly.
suddenly, my CPU is used a 100% and Excel process use more than 182 Mb of memory
for this task, whereas my file "test.xls" is no more than 4.4 Mb.

could you help me please ?
thanks a lot,
maileen

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
Automatically Copy content of a cell Vince Excel Discussion (Misc queries) 1 December 17th 08 08:27 AM
How do I copy a row depending on the content of a cell in the row Robert59 Excel Worksheet Functions 2 October 19th 07 06:26 PM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
Copy the formatting and content of a range davidthegolfer Excel Discussion (Misc queries) 2 February 22nd 06 03:43 PM
How to search and copy cell content to another sheet? Roel Excel Worksheet Functions 1 March 7th 05 01:56 PM


All times are GMT +1. The time now is 03:21 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"