Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is how I would do it:
Sub CopyData() 'need online help to paste special Dim SourceWB As Workbook 'Dim DestinationWB As Workbook 'Dim DestinationWS As Worksheet Set SourceWB = Workbooks.Open("\\Wuslonfs03\share\product\Demand Planning\DPDatabases\AbyA.xls") 'Set DestinationWB = ThisWorkbook 'With SourceWB ' Set DestinationWS = DestinationWB.Worksheets("Any by Any") ' With .Worksheets("Any by Any") ' .Range("A1:AC65536").Copy ' End With ' 'End With SouceWB.Worksheets("Name of Worksheet to be copied"). _ Range("A1:AC65536").Copy ThisWorkbook.Worksheets("Any by Any").Range("A1"). _ PasteSpecial Paste:=xlPasteValues Application.CutCopyMode = False End Sub Note: Sometimes I think that extra variables just get in the way, but I don't really know your intent so you should use them as you see fit. Tom |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Paste Special values for entire workbook | Excel Programming | |||
Copy Paste Special Values Workbook | Excel Programming | |||
Copy, Paste Special Values all sheets in workbook | Excel Programming | |||
Similar to paste special from another workbook | Excel Worksheet Functions | |||
How to copy formulas to a new workbook? Paste Special is different | Excel Worksheet Functions |