ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Deleting all data in a Worksheet (https://www.excelbanter.com/excel-programming/384420-deleting-all-data-worksheet.html)

kirkm[_6_]

Deleting all data in a Worksheet
 

Looking for a method to delete everything in a Worksheet from code.
Not the sheet itself, though.

And, is it possible to keep the structure, i.e the way the columns
have been formatted ?

Many thanks - Kirk

Dave Peterson

Deleting all data in a Worksheet
 
activesheet.cells.clearcontents

Will clear all the values and formulas from the activesheet.



kirkm wrote:

Looking for a method to delete everything in a Worksheet from code.
Not the sheet itself, though.

And, is it possible to keep the structure, i.e the way the columns
have been formatted ?

Many thanks - Kirk


--

Dave Peterson

kirkm[_6_]

Deleting all data in a Worksheet
 
On Fri, 02 Mar 2007 19:52:14 -0600, Dave Peterson
wrote:

activesheet.cells.clearcontents

Thank you.


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com