Checking for empty drop down values

Gerben

New Member
Joined
Mar 9, 2009
Messages
1
Hello!

I try to check for empty drop down boxes and after that I would like the program to do something else (go to sheet k2 in the following example)
I like to do this only when there are no empty values. In the case below if I click 'ok' on the appearing messageboxes, I still go to sheet k2

Not that difficult, but for me as a beginner;), who can help me?
Thanks in advance

Code:
Private Sub CommandButton1_Click()
'' check for empty values
Dim DropDownValue
DropDownValue = ActiveSheet.Range("e5").Value
Select Case DropDownValue
Case 1
MsgBox "Retail brand not chosen"
End Sub
End Select
Dim DropDownValue1
DropDownValue1 = ActiveSheet.Range("d10").Value
Select Case DropDownValue1
Case 1
MsgBox "Gender not chosen"
End Select
Dim DropDownValue2
DropDownValue2 = ActiveSheet.Range("d12").Value
Select Case DropDownValue2
Case 1
MsgBox "Price not chosen"
End Select
Dim DropDownValue3
DropDownValue3 = ActiveSheet.Range("d14").Value
Select Case DropDownValue3
Case 1
MsgBox "Type not chosen"
End Select
 
''go to next sheet
Dim DropDownValue5
DropDownValue5 = ActiveSheet.Range("d10").Value
Select Case DropDownValue
Case 2, 3, 4
Sheets("k2").Select
End Select
 
 
 
End Sub
 
Last edited by a moderator:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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