Reset Button for Drop Down Lists?

SMAsh67

New Member
Joined
Jan 8, 2018
Messages
18
Hi, I'm looking for some help with a form I am creating...

I'm using multiple dropdown lists using data validation. Most of the dropdowns give the options of "Yes,No,N/A" and some give the option of "N/A,Yes,No". I'd like to create a button that when clicked sets all the drop downs back to the default of the first option in each. Is this possible? I've been searching and can't find anything to help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
.
In this example I created a Data Validation dropdown with two choices : #1 The Main Title of the drop down "Select Sheet" and #2 a sheet choice "Sheet 3".

With the following macro, whenever a Drop Down selection is made .. the last line of the macro returns the drop down back to the Title.
You can have as many choices in your macro as you like and still the last entry can be the value you want displayed after the macro is run.


Code:
Option Explicit


Private Sub ComboBox1_Change()
    If ComboBox1.Value = "Sheet 3" Then
        Sheets("Sheet3").Select
    End If
    
    
        ComboBox1.Value = "Select Sheet"
 
End Sub
 
Last edited:
Upvote 0
Thank you for your quick response! I guess I should have prefaced my question with "I am a total novice and excel still confuses me a lot". Sorry, but I don't understand how this works with the drop downs I'm using. They are not combo boxes, I didn't use VB or ActiveX, I went to the data tab and selected data validation.

I tried recording a macro but when I use it, nothing happens. It reads:

Code:
Sub RESET()
   Range("B9").Value = Yes

End Sub

or


Code:
Sub Reset_Dropdowns()
    Range("B9:C9").Select
End Sub

I feel like I'm just missing something simple, like the line in your example using '.Value'. Is there some way to put that in my macro for the sort of drop down I'm using?

Thanks :help:
 
Last edited:
Upvote 0
I figured it out! It's simply...

Code:
Sub Reset_Dropdowns()
    Range("B9:C9").Value = "Yes"
End Sub

Thank you :)
 
Last edited:
Upvote 0
.
Ok .. got it. Misunderstood that you were using Data Validation.

Let's say your drop down is located in Sheet1 D5 and the first item is Yes

Code:
Option Explicit

Sub ResetDataVal()
    Sheets("Sheet1").Range("D5").Value = "Yes"
End Sub

Ok ... you got it ! Great.
 
Last edited:
Upvote 0
Hi SMAsh67. I've never used VBA so am a total novice. Can you tell me how you used your Reset_Dropdowns with a button. I'm keen for exactly the same thing.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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