Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have code in a workbook1 which opens workbook2, does some trivial items,
then selects the range A:K in workbook 2. I am then trying to sort the range in workbook2 from the code in workbook1, but am getting the following error: "Run time error '1004': Application defined or object defined error." Following is the select code. Can someone please tell me what is causing the error and how to correct? Thanks. Workbooks.Open Filename:="P:\PRT\IndustryReview\Client Summary Performance.xls" Windows("Client Summary Performance.xls").Activate ActiveWorkbook.ActiveSheet.Range("A65536").End(xlU p).Offset(1, 0).Select Selection.PasteSpecial Paste:=xlPasteValues Selection.PasteSpecial Paste:=xlPasteFormats Columns("A:K").Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("B2") _ , Order2:=xlDescending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _ False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _ :=xlSortNormal |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting Worksheets in a workbook | Excel Worksheet Functions | |||
saving macro from workbook to Personal Macro Workbook | Excel Discussion (Misc queries) | |||
linking within a workbook and sorting | Excel Discussion (Misc queries) | |||
Sorting a Workbook w/ Links | Excel Worksheet Functions | |||
Sorting in Shared Workbook | Excel Worksheet Functions |