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
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
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: