Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

copy content of 1 sheet to another one.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Maileen - 22 Feb 2006 05:28 GMT
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
NAVEEN - 22 Feb 2006 07:39 GMT
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

> Hi,
>
[quoted text clipped - 12 lines]
> thanks a lot,
> maileen
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.