Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
avoid turning #/## into date when pasting or parsing | Excel Discussion (Misc queries) | |||
Excel 2002: How to avoid pasting blanks ? | Excel Discussion (Misc queries) | |||
Excel 2002 : How to avoid pasting incremental refrences ? | Excel Discussion (Misc queries) | |||
how to avoid merging when pasting multiple ranges | Excel Programming |