VBA Clear Table Format in Excel. Clearing or deleting or removing formatting from the table in Excel using VBA. Here we use the ListObjects collection and TableStyle property to delete or clear format. In this tutorial let us learn the example and step by step instructions to clear Format from the table.
Let us see the example to clear Format or styling from the table of data body range. The sheet name defined as ‘Table‘. And we use table name as ‘MyDynamicTable‘. You can change these two as per your requirement. Where TableStyle property is used to remove format from the table.
'VBA Clear Table Format Sub VBAF1_Clear_Table_Format() 'Declare Variables Dim sTableName As String Dim sSheetName As String 'Define Variables sSheetName = "Table" sTableName = "MyDynamicTable" 'Clear or Remove Table Format Sheets(sSheetName).ListObjects(sTableName).TableStyle = "" End Sub
Output: Here is the following output screenshot of above example macro code.
You can refer the following link for the step by step instructions.
Click on the following links of the useful resources. These helps to learn and gain more knowledge.