Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default 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!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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!




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to clear up useless content within worksheet? Eric Excel Discussion (Misc queries) 1 May 31st 10 04:39 AM
Clear Cell Content Query captedgar Excel Discussion (Misc queries) 1 February 22nd 10 07:36 PM
How do I clear 'form' content from an unprotected cell without mac Casey M Excel Worksheet Functions 4 January 22nd 09 07:10 PM
How to clear content from unprotected Field Amean1 Excel Worksheet Functions 1 November 11th 06 07:50 PM
Clear Cells Content No_Spam Excel Discussion (Misc queries) 2 August 20th 06 04:01 PM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"