This is how I clear the data:
Sub Macro3()
With Sheet1.ListObjects("Table1")
If Not .DataBodyRange Is Nothing Then
.DataBodyRange.Delete
End If
End With
End Sub
More Related Contents:
- How to add a custom Ribbon tab using VBA?
- filter out multiple criteria using excel vba
- Closing Excel Application using VBA
- How to add parameters to an external data query in Excel which can’t be displayed graphically?
- Cannot VBA write data to cells in Excel 2007/2010 within a function
- VBA equivalent to Excel’s mod function
- Excel VBA to match and line up rows
- Excel: the Incredible Shrinking and Expanding Controls [closed]
- Excel Date Conversion from yyyymmdd to mm/dd/yyyy
- How to programmatically code an ‘undo’ function in Excel-Vba? [duplicate]
- How to check whether certain sheets exist or not in Excel-VBA? [duplicate]
- How to do a “Save As” in vba code, saving my current Excel workbook with datestamp?
- excel vba compare & copy worksheets from 2 excel files
- How to avoid using Select in Excel VBA
- How to return a result from a VBA function
- Cycle through sub-folders and files in a user-specified root directory [duplicate]
- Convert Text to Date?
- Loop through each cell in a range of cells when given a Range object
- Checking for #N/A in Excel cell from VBA code
- Non-web SQL Injection
- Is there a way to slow down a Web Scraper so it will pick up the code?
- Create a folder and sub folder in Excel VBA
- One-dimensional array from Excel Range
- Renaming Files with Excel VBA
- Is there a way to import data from .csv to active excel sheet?
- Break out of a While…Wend loop
- How to make safe API Timers in VBA?
- How to extract groups of numbers from a string in vba
- How to implement custom iterable class in VBA
- How to find Number of Occurences of Slash from a strings