Formats the range of cells A1:D10 as a table.
(function() { Api.GetActiveSheet().FormatAsTable("A1:D10"); })();
Methods used: GetActiveSheet, FormatAsTable
Sub example() Sheet1.ListObjects.Add(xlSrcRange, Range("A1:D10"), , xlYes).Name = "myTable1" End Sub