Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default speeding up copy and paste code


Im developing some code that will look for values in about 1
spreadsheets that are provided for us externally (sheet A).
I need to extract about 115 columns of data out of about 123 b
determining the criteria, i can do this fine, i can also declare th
range i want to copy fine and if this code is run on its own it wil
loop through to the end in seconds.

The code starts to slow down when i start adding the code to paste th
data into the required spreadsheet (sheet B), this has to be done on
coloumn at a time so as to ommit columns i don't need. the copy cod
and paste code work really fast, the code slows down when iv
performed one iteration and am reopening/activating sheet A afte
pasteing in sheet b?

I can't understand what the problem is, basically if i choose to
remove the copy and paste code and just have the sheets open in th
loop 123 times it still goes at snails pace ie 5 seconds a loop! It
not the sheets that are a problem as i recorded a macro to test thi
problem and it runs at the normal speed that i desire.

ive been opening workbooks with following
Windows("intermediate.xls").Activate OR
bkI.Activate - where bki is a declared workbook

Any idea

--
cereldin
-----------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...fo&userid=3206
View this thread: http://www.excelforum.com/showthread.php?threadid=53466

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default speeding up copy and paste code

Sounds like you could copy the entire sheet (once) and then
delete the columns you don't need from the copied sheet.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"cereldine"
wrote in message
Im developing some code that will look for values in about 15
spreadsheets that are provided for us externally (sheet A).
I need to extract about 115 columns of data out of about 123 by
determining the criteria, i can do this fine, i can also declare the
range i want to copy fine and if this code is run on its own it will
loop through to the end in seconds.

The code starts to slow down when i start adding the code to paste the
data into the required spreadsheet (sheet B), this has to be done one
coloumn at a time so as to ommit columns i don't need. the copy code
and paste code work really fast, the code slows down when ive
performed one iteration and am reopening/activating sheet A after
pasteing in sheet b?

I can't understand what the problem is, basically if i choose to i
remove the copy and paste code and just have the sheets open in the
loop 123 times it still goes at snails pace ie 5 seconds a loop! Its
not the sheets that are a problem as i recorded a macro to test this
problem and it runs at the normal speed that i desire.

ive been opening workbooks with following
Windows("intermediate.xls").Activate OR
bkI.Activate - where bki is a declared workbook

Any ideas


--
cereldine
------------------------------------------------------------------------
cereldine's Profile: http://www.excelforum.com/member.php...o&userid=32069
View this thread: http://www.excelforum.com/showthread...hreadid=534660

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
copy and paste using vb code ASU Excel Discussion (Misc queries) 1 September 10th 06 01:41 AM
Help on cleaning / speeding up code Chris Salcedo Excel Programming 2 October 17th 05 01:16 AM
Speeding Up Code [email protected] Excel Programming 8 August 31st 05 04:46 PM
Online Resources for Speeding Up Code orekin Excel Programming 1 July 8th 04 04:09 AM
Help-Copy&Paste code Bourbon[_30_] Excel Programming 2 January 29th 04 02:47 PM


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