drrocket5292
Technical User
how do you define a custom list in VBA and then call it? heres my code but it doesnt seem to work. Right now I have that list as my custom list #13 but its not like that on other peoples computers and I want to have a universal custom list. is this possible? thanks for the help.
Application.AddCustomList Array ("40", "36", "41", "48", "38", "54", "35", "3", "42", "2")
Range("A2:R" & n).Select
Range("R" & n).Activate
Selection.Sort Key1:=Range("R2"), Order1:=xlAscending, Key2:=Range("C2") _
, Order2:=xlAscending, Header:=xlGuess, _
OrderCustom:=13, MatchCase:=False, Orientation:=xlTopToBottom
Application.AddCustomList Array ("40", "36", "41", "48", "38", "54", "35", "3", "42", "2")
Range("A2:R" & n).Select
Range("R" & n).Activate
Selection.Sort Key1:=Range("R2"), Order1:=xlAscending, Key2:=Range("C2") _
, Order2:=xlAscending, Header:=xlGuess, _
OrderCustom:=13, MatchCase:=False, Orientation:=xlTopToBottom