Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copying a range from one workbook to another workbook
Oops forgot to show the error message that I'm getting.
'Run time Error "438" Object doesn't support this property or method See line that says 'Error happens at next line' Steve "caldog" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copying workbook formating to a differnent workbook | Excel Worksheet Functions | |||
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 |