A clear button that will clear certain cells on all sheets

WebMistress

New Member
Joined
Nov 25, 2003
Messages
12
Does anyone know the code for doing this? I know it's most likely going to be a VB code.

I have 7 worksheets and I need several cells in each worksheet that need to be cleared when a button is pressed on the first sheet.

Thanks. :biggrin:
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

WebMistress

New Member
Joined
Nov 25, 2003
Messages
12
Re: A clear button that will clear certain cells on all shee

Thanks I will see if that fixs what I need for my spread sheets :LOL:
 

WebMistress

New Member
Joined
Nov 25, 2003
Messages
12
What I did was... I went though the whole spread sheet and renamed the areas to rg1-10 then I made MasterClearList=rg-10 and created a button.

What is wrong with the following code? It's asking me to debug.


Private Sub CommandButton1_Click()
Range("MasterClearList").ClearContents
End Sub
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,102
Messages
5,768,104
Members
425,454
Latest member
khoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top