I'd like to make my code just a little more succinct and in the process speed up its execution. I have a lot of copy/paste iterations. I'd like to be able to do the paste part without actually activating or selecting the destination range. Here is my code so far:
It's the last four lines that I'd like to condense into possibly a singe line or maybe two. Something along the lines of this would be ideal (except that this doesn't work as written):![]()
Private Sub copyPaste(ByVal wbSource As String, ByVal wbDest As String, thisRange As String, ByVal wsDest As Worksheet) Windows(wbSource).Activate Range(thisRange).Copy Windows(wbDest).Activate wsDest.Activate Range(thisRange).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False End Sub
Anyone have any suggestions? Thanks.![]()
Windows(wbDest).wsDest.Range(thisRange).PasteSpecial ...











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks