Home > Forum Home > Excel Portfolio Optimization Template > Run time error 438 Share

Run time error 438

Excel Help for Run Time Error 438 in Excel Portfolio Optimization Template


Forum TopicPost Reply Login

Run Time Error 438

Rate this:
(3/5 from 1 vote)
Angryis anyone can help me with this,when i run this program, this window appreas

microsoft visual basic
running time error '438'


then, i can only stop this program

THANK YOU~
 meilin
 Posted by on
 
Replies - Displaying 11 to 13 of 13Order Replies By: Most Recent | Chronological | Highest Rated
Oops
Rate this:
(3/5 from 1 vote)
The Excel run time error 438 occurs when an method is not supported for the object in the VBA code. If a macro has been recorded in a later version of Excel, the object method may not be compatible with an earlier version.

In order to locate the exact problem, click on the Debug button when the error message appears and see which line of code is highlighted in the VBA project.
 Excel Business Forums Administrator
 Posted by on
ShockedThe sorting functionality is more advanced in Excel 2007 and 2010 than Excel 2003 and prior.  For Excel 97-2003 simple sorting cannot be cleared as the data order is simply changed and the method is not stored in memory.

A filter can however be both set and cleared. To set a filter, sort on a column and then clear the filter, the following code (with comments) can be used.

VBA Code:
'Select the region
Sheets("Value of Incentives by Cust").Select
Range("O19:U80").Select

'Create a filter on the selected region
Selection.AutoFilter

'Sort a column - add more with Key2 etc
Range("U19:U80").Sort Key1:=Range("U19"), Order1:=xlDescending, Header:= _
        xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal

'Clear the filter (note that this is the same as setting a filter so if one exists it will clear it and if not it will add one).
Selection.AutoFilter
 Excel Business Forums Administrator
 Posted by on
Confused
Rate this:
(3/5 from 1 vote)
Hello, can someone please help..I am having the same problem when running the optimization.

"running time error '438'


then, i can only stop this program - PLEASE HELP!  Thanks, Lisa

 Posted by on
 Displaying page 2 of 2 

Find relevant Excel templates and add-ins for Run time error 438 in the