用VBA如何将列表框中的各项进行排序?

2025-04-03 19:48:33
推荐回答(1个)
回答1:

比如要排序A1:B5
则VBA为:
Range("A1:B5").Sort Key1:=Range("B1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
SortMethod:=xlPinYin, DataOption1:=xlSortNormal