ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clear the content of a worksheet using VBA (https://www.excelbanter.com/excel-programming/287724-clear-content-worksheet-using-vba.html)

Shawshank

Clear the content of a worksheet using VBA
 
I want to clear the content of a whole worksheet using VBA.
Does anyone know how to do it?

Thanks!



papou[_7_]

Clear the content of a worksheet using VBA
 
Hi Shawshank
Sheets("Sheet1").Cells.clearcontents

HTH
Regards
Pascal


"Shawshank" a écrit dans le message de
...
I want to clear the content of a whole worksheet using VBA.
Does anyone know how to do it?

Thanks!





Chip Pearson

Clear the content of a worksheet using VBA
 
Try something like

Worksheets("Sheet1").Cells.Clear ' or ClearContents


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Shawshank" wrote in message
...
I want to clear the content of a whole worksheet using VBA.
Does anyone know how to do it?

Thanks!





Bob Phillips[_6_]

Clear the content of a worksheet using VBA
 

ActiveSheet.Cells.ClearContents

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Shawshank" wrote in message
...
I want to clear the content of a whole worksheet using VBA.
Does anyone know how to do it?

Thanks!






All times are GMT +1. The time now is 08:46 AM.

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