![]() |
|
#2
|
|||
|
|||
|
So it was syntax, just had to figure out how to get it in there... See below if you also need this.
Code:
tbl_name = "Table" & foundNum & "[[#All],[Sheet & Location]]"
tbl1_name = "Table" & foundNum
ActiveSheet.ListObjects.Add(xlSrcRange, Range(tbl_start & ":$AA$" & row18), , xlYes).Name = "Table" & foundNum
ActiveWorkbook.Worksheets("Instructions").ListObjects(tbl1_name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Instructions").ListObjects(tbl1_name).Sort.SortFields _
.Add Key:=Range(tbl_name), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets("Instructions").ListObjects(tbl1_name).Sort
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic table numbers
|
srinidhi.mv88 | Word VBA | 5 | 06-22-2015 06:35 AM |
| Dynamic Mail Merged Table | hanskimber | Mail Merge | 2 | 04-24-2015 11:21 PM |
| VBA sort table code | mikec | Excel Programming | 8 | 10-01-2013 04:37 PM |
| Sort table using macro | saslotteroy | Word VBA | 2 | 09-15-2011 02:41 PM |
How to sort table having three columns?
|
Bahir Barak | Word | 2 | 01-20-2011 01:52 PM |