Button to Clear contents from drop down select in Excel

Excelsloth

New Member
Joined
Jan 10, 2024
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
I cannot seem to find or create the necessary Macro for my clear All button in excel.
I have a yes / no / N/A option in each line of my colum and need to clear the contents without deleting the drop down.
This way the person can reselect 1 of 3 options.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
When you say clear the contents, do you want it to be blank? The natural choice for clearing contents would be
VBA Code:
Range("A2:A99").ClearContents
Modify to reference where you actually have your data.
 
Upvote 0
I cannot seem to find or create the necessary Macro for my clear All button in excel.
I have a yes / no / N/A option in each line of my colum and need to clear the contents without deleting the drop down.
This way the person can reselect 1 of 3 options.

When you say clear the contents, do you want it to be blank? The natural choice for clearing contents would be
VBA Code:
Range("A2:A99").ClearContents
Modify to reference where you actually have your data.
Thanks for your advise.
Yes I would like for it to be blank, remove all drop selections. So the person can start fresh.
However I tried use the code you provided and it would not work.
I had tried with my ranges. Range(C3:C6).ClearContents and unfortunately it did not work. Got an error message that my macros were possibly disactivated.
I will have to try and figure something out.
 
Upvote 0
Do you have other macros that work in the same file?

The problem is in your macro settings, not the code. Check your security settings.
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,313
Members
452,634
Latest member
cpostell

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
Back
Top