Excel 2016 VBA recorded sub doesn't sort -


i trying sort table in vba, doesn't work. when record macro, works fine during recording, table gets sorted. if run recorded macro module, doesn't sort. here's recorded code:

sub macro3()      activeworkbook.worksheets("sheet1").listobjects("tdpm").sort.sortfields _         .clear     activeworkbook.worksheets("sheet1").listobjects("tdpm").sort.sortfields _         .add key:=range("tdpm[site id]"), sorton:=xlsortonvalues, order:= _         xlascending, dataoption:=xlsortnormal     activeworkbook.worksheets("sheet1").listobjects("tdpm").sort         .header = xlyes         .matchcase = false         .orientation = xltoptobottom         .sortmethod = xlpinyin         .apply     end  end sub 


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -