#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 172
Default Clear Contents

I have 12 worksheets in my file and I need to clear the contents of only 4 of
them but the ranges I need cleared are different on all 4 of these
worksheets. How can I set up vba code to clear the contents with my specified
ranges and worksheet names?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Clear Contents

Pretty easy

sub clearem
sheets("aa").range("a2:x33").clearcontents
sheets("bb").range("c22:x333").clearcontents
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Secret Squirrel" wrote in
message ...
I have 12 worksheets in my file and I need to clear the contents of only 4
of
them but the ranges I need cleared are different on all 4 of these
worksheets. How can I set up vba code to clear the contents with my
specified
ranges and worksheet names?


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
to clear contents of a spreadsheet Jerry Excel Discussion (Misc queries) 2 August 17th 07 02:20 AM
Clear Contents Of Cells Where Value = 0 carl Excel Worksheet Functions 3 July 6th 07 06:02 PM
Code to clear contents jk Excel Worksheet Functions 3 September 4th 06 06:25 PM
Clear clipboard contents Cordobes Excel Discussion (Misc queries) 4 November 22nd 05 02:41 AM
vb to clear cell contents RichT New Users to Excel 6 June 27th 05 08:26 AM


All times are GMT +1. The time now is 07:03 AM.

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

About Us

"It's about Microsoft Excel"