Home > Forum Home > Excel Portfolio Optimization Template > Run time error 438 > Error 438 -- PLEASE help Share

Error 438 -- PLEASE help

Excel Help for Error 438 -- Please Help in Excel Portfolio Optimization Template


Forum TopicLogin

Error 438 -- Please Help

Rate this:
(3/5 from 1 vote)
ShockedI am running these two macros in my spreadsheet in Excel 2007 and they run perfectly. However, my colleague sees a runtime 438 error when she tries to run it in Excel 2003. Any ideas? PLEASE help.

See my macros below:


Macro 1)

VBA Code:
Sub Sort()
'
' Sort Macro

    ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort.SortFields.Add _
        Key:=Range("U19:U80"), SortOn:=xlSortOnValues, Order:=xlDescending, _
        DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort
        .SetRange Range("O19:U80")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
End Sub


Macro 2)
VBA Code:

Sub VOIbyCustomer()
'
' VOIbyCustomer Macro
'
    Application.Goto Reference:="Targeted"
    Selection.ClearContents
    Range("B18:I80").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "E8:E9"), CopyToRange:=Range("Targeted"), Unique:=False
  
      ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort.SortFields.Add _
        Key:=Range("U19:U80"), SortOn:=xlSortOnValues, Order:=xlDescending, _
        DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Value of Incentives by Cust").Sort
        .SetRange Range("O19:U80")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply

End With
 
Range("N15").Select
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollColumn = 13


End Sub





 [email protected]
 Posted by on
 
View Full Post

Find relevant Excel templates and add-ins for Error 438 -- PLEASE help in the