Forum

How to create a tab...
 
Notifications
Clear all

How to create a table in Excel using VBA

2 Posts
2 Users
0 Reactions
72 Views
(@eyad97)
Posts: 1
New Member
Topic starter
 

Please could you help me to create a table in Excel using VBA?

 
Posted : 10/12/2020 10:45 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi,

You can create a table with this line where the data for the table resides in A1:F6

ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$F$6"), , xlYes).Name = "Table1"

refer to https://docs.microsoft.com/en-us/office/vba/api/excel.listobjects.add

Regards

Phil

 
Posted : 11/12/2020 8:19 pm
Share: