I'm trying to run this code to turn a range with proper headers into a table. When I run this code my headers become "Column1, Column 2, Column 3, etc.). How can I prevent this from happening?
VBA Code:
Sub Macro3()
Range("A1").Activate
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
ActiveSheet.ListObjects.Add(xlYes).Name = _
"Table1"
ActiveCell.Range("Table1[#All]").Select
End Sub