Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying a range from one workbook to another workbook
I know there is probably a simple answer to this problem, but fot the life of
me, I can't find it. Here is my code: Private Sub SingleValues_Click() Workbooks.Open Filename:="C:\Excel\Data1.xls" 'Refresh Data 'Sheets("Singles").Select 'Selection.QueryTable.Refresh BackgroundQuery:=False 'Sheets("Doubles").Select 'Selection.QueryTable.Refresh BackgroundQuery:=False 'Copy Data Windows("Data1.xls").Activate Sheets("Singles").Select Range("A9:F51").Copy Windows("Data2.xls").Activate Sheets("Single Game Stats").Select 'Error happens at next line Range("A9:F51").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False 'Sort Download Windows("Jai-Alai.xls").Activate Worksheets("Single Game Stats").Range("A9:F51").Select Selection.Sort Key1:=Range("B9"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Windows("Data1.xls").Activate ActiveWorkbook.Close End Sub Thanks for the help Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copying a range from one workbook to another workbook | Excel Programming | |||
Copying A Worksheet From Each Open Workbook to an new Workbook | Excel Worksheet Functions | |||
Copying range to other workbook | Excel Programming | |||
Problem copying a range to a different workbook | Excel Programming | |||
Copying a Filtered Range from a Sheet in another Workbook | Excel Programming |