Práce s Excel tabulkami

Selecting Areas Of A Table With VBA

Select VBA Coding
Entire Table ActiveSheet.ListObjects(„Table1“).Range.Select
Table Header Row ActiveSheet.ListObjects(„Table1“).HeaderRowRange.Select
Table Data ActiveSheet.ListObjects(„Table1“).DataBodyRange.Select
Third Column ActiveSheet.ListObjects(„Table1“).ListColumns(3).Range.Select
Third Column (Data Only) ActiveSheet.ListObjects(„Table1“).ListColumns(3).DataBodyRange.Select
Select Row 4 of Table Data ActiveSheet.ListObjects(„Table1“).ListRows(4).Range.Select
Select 3rd Heading ActiveSheet.ListObjects(„Table1“).HeaderRowRange(3).Select
Select Data point in Row 3, Column 2 ActiveSheet.ListObjects(„Table1“).DataBodyRange(3, 2).Select
Subtotals ActiveSheet.ListObjects(„Table1“).TotalsRowRange.Select

Inserting Rows and Columns Into The Table

Select VBA Coding
Insert A New Column 4 ActiveSheet.ListObjects(„Table1“).ListColumns.Add Position:=4
Insert Column at End of Table ActiveSheet.ListObjects(„Table1“).ListColumns.Add
Insert Row Above Row 5 ActiveSheet.ListObjects(„Table1“).ListRows.Add (5)
Add Row To Bottom of Table ActiveSheet.ListObjects(„Table1“).ListRows.Add AlwaysInsert:= True
Add Totals Row ActiveSheet.ListObjects(„Table1“).ShowTotals = True

Zdroj:

programovani/vba/excel-tabulky.txt · Poslední úprava: 24.05.2016 19:29 autor: vm

Nástroje pro stránku