Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following macro I run from a custom button on a custom toolbar:
Sub SortRef() Range("G6:T1000").Select Selection.Sort Key1:=Range("G6"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom Range("H6:H1000").Select Selection.Font.ColorIndex = 10 Range("I6:I3000").Select Selection.Font.ColorIndex = 41 Range("J6:J3000").Select Selection.Font.ColorIndex = 13 Range("L6:L3000").Select Selection.Font.ColorIndex = 3 Range("G4").Select End Sub When it's run the following message appears: 'Object library invalid or contains references to object definitions that could not found' Anyone know how to fix this? Thank you Pat |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() First, let's get rid of the selections. Now, could it be that you are running on a sheet that does not have these ranges? I am puzzled by your question. Data is contained throughout the Range("G6:T1000") "Don Guillett" wrote in message ... First, let's get rid of the selections. Now, could it be that you are running on a sheet that does not have these ranges? Sub SortRef() Range("G6:T1000").Sort Key1:=Range("G6"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom Range("H6:H1000").Font.ColorIndex = 10 Range("I6:I3000").Font.ColorIndex = 41 Range("J6:J3000").Font.ColorIndex = 13 Range("L6:L3000").Font.ColorIndex = 3 End Sub -- Don Guillett SalesAid Software "Pat" wrote in message ... The following macro I run from a custom button on a custom toolbar: Sub SortRef() Range("G6:T1000").Select Selection.Sort Key1:=Range("G6"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=2, MatchCase:=False, Orientation:=xlTopToBottom Range("H6:H1000").Select Selection.Font.ColorIndex = 10 Range("I6:I3000").Select Selection.Font.ColorIndex = 41 Range("J6:J3000").Select Selection.Font.ColorIndex = 13 Range("L6:L3000").Select Selection.Font.ColorIndex = 3 Range("G4").Select End Sub When it's run the following message appears: 'Object library invalid or contains references to object definitions that could not found' Anyone know how to fix this? Thank you Pat |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error 400 when running Macro | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Error Running a Macro | Excel Discussion (Misc queries) | |||
Error when running macro | Excel Programming |