Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This would change from:
origwkbk.worksheets("origin sheet a").range("b3:c198").copy _ destination:=newwkbk.worksheets("dest sheet A").range("b3") to: origwkbk.worksheets("origin sheet a").range("b3:c198").copy newwkbk.worksheets("dest sheet A").range("b3").pastespecial paste:=xlpastevalues Or you could just assign the values, too: dim rngtocopy as range dim destcell as range set rngtocopy = origwkbk.worksheets("origin sheet a").range("b3:c198") set destcell = newwkbk.worksheets("dest sheet A").range("b3") destcell.resize(rngtocopy.rows.count,rngtocopy.col umns.count).value _ = rngtocopy.value Using the range variables makes that last statement easier to type and makes the whole thing easier to change. mwc0914 wrote: Dave, What if I'm copying cells that contain a formula & I want to do a paste special of values only in the destination. What would my stement look like then? Thanks -- mwc0914 ------------------------------------------------------------------------ mwc0914's Profile: http://www.excelforum.com/member.php...o&userid=24130 View this thread: http://www.excelforum.com/showthread...hreadid=487404 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying multiple sheets to new Workbook | Excel Discussion (Misc queries) | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
COPYING Workbook and sheets automatically | Excel Discussion (Misc queries) | |||
Copying Sheets to New Workbook | Excel Programming | |||
Copying Sheets to New Workbook | Excel Programming |