Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help! Trying to avoid cut & pasting!


Hi,

I have a macro that cuts and pastes certain columns from one workbook
to another. Here is what I have (which works fine, but is slow because
I have lots of columns to fill):

Windows("" & var_Download_Filename).Activate
Sheets("" & var_Download_sheetname).Select
Range("A" & int_Download_Firstrow & ":A" &
int_Download_Lastrow).Select
Selection.Copy

Windows("" & var_Template_filename).Activate
Sheets("" & var_Template_sheetname).Select
Range("A" & int_Template_Firstrow & ":A" &
int_Template_Lastrow).Select
Selection.PasteSpecial


I tried modifying my code to this:

Range("A" & int_Template_Firstrow & ":A" & int_Template_Lastrow).Value
= Range("A" & int_Download_Firstrow & ":A" &
int_Download_Lastrow).Value


Is there something wrong with it? Because when I checked column "A", it
was blank. Please help. Thanks!!


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile: http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=567210

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Help! Trying to avoid cut & pasting!

Ccheck out my response to your origianl post. If the issue is with speed then
you may want to consider disabling calculations while the code is running...

Application.Calculation = xlManual
'Your Code
Applicaiton.Calculation = xlAutomatic
--
HTH...

Jim Thomlinson


"Sethaholic" wrote:


Hi,

I have a macro that cuts and pastes certain columns from one workbook
to another. Here is what I have (which works fine, but is slow because
I have lots of columns to fill):

Windows("" & var_Download_Filename).Activate
Sheets("" & var_Download_sheetname).Select
Range("A" & int_Download_Firstrow & ":A" &
int_Download_Lastrow).Select
Selection.Copy

Windows("" & var_Template_filename).Activate
Sheets("" & var_Template_sheetname).Select
Range("A" & int_Template_Firstrow & ":A" &
int_Template_Lastrow).Select
Selection.PasteSpecial


I tried modifying my code to this:

Range("A" & int_Template_Firstrow & ":A" & int_Template_Lastrow).Value
= Range("A" & int_Download_Firstrow & ":A" &
int_Download_Lastrow).Value


Is there something wrong with it? Because when I checked column "A", it
was blank. Please help. Thanks!!


--
Sethaholic
------------------------------------------------------------------------
Sethaholic's Profile: http://www.excelforum.com/member.php...o&userid=25113
View this thread: http://www.excelforum.com/showthread...hreadid=567210


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
avoid turning #/## into date when pasting or parsing jimtherunner Excel Discussion (Misc queries) 5 October 27th 08 05:52 PM
Excel 2002: How to avoid pasting blanks ? Mr. Low Excel Discussion (Misc queries) 3 September 15th 07 02:17 AM
Excel 2002 : How to avoid pasting incremental refrences ? Mr. Low Excel Discussion (Misc queries) 3 August 4th 07 03:46 PM
how to avoid merging when pasting multiple ranges Stian Excel Programming 6 May 20th 05 03:29 PM


All times are GMT +1. The time now is 05:41 PM.

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"