keithweinberger Posted May 1, 2006 Share Posted May 1, 2006 I have a VBA script connected to a macro that copies rows from one sheet to another in my excel workbook. However, this macro is so slow, and takes 100% of my CPU that I have to pull the battery to get it to stop. Below is the code that seems to be so slow. does anyone have different code I can use, or can help with this ?thanks in advanced.Sub TransferLine(rcnt As Long, trcnt As Long) Sheets("ProjectPlan").Rows(rcnt).Copy Sheets("CalculatedPlan").Rows(trcnt).PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=FalseEnd SubI can provide the entire macro, if one needs to see thatAgain, thanks for any help !! Link to comment Share on other sites More sharing options...
discarnet Posted May 12, 2006 Share Posted May 12, 2006 Are you trying to copy a compete row if so try thisSub copyrow() Rows("5:5").Select' change the above row to the one you want to copy Selection.Copy Sheets("Sheet2").Select' change the "sheet2" to the sheet you want to copy to Rows("1:1").Select ActiveSheet.PasteEnd Subthis will take a fraction of a second Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now