To set the table style to None, replace:
.TableStyle = "TableStyleLight21"
With:
.TableStyle = ""
As for random table names, this should create a table name with a random number between 100,000 and 1,000,000 (and set the table style to None):
Sub Macro1()
Dim newRand As Long
Randomize
newRand = CLng((1000000 - 100000 + 1) * Rnd + 100000)
ActiveSheet.ListObjects.Add(xlSrcRange, Range(Selection.Address), , xlYes).Name = "Table" & newRand
With ActiveSheet.ListObjects("Table" & newRand)
.ShowTableStyleRowStripes = False
.ShowHeaders = True
.TableStyle = ""
.ShowTotals = True
End With
End Sub
Bookmarks