wwbwb
Well-known Member
- Joined
- Oct 20, 2003
- Messages
- 513
Greetings:
In a production reporting spreadsheet, users fill in their daily activities via drop downs.
b5:b25 contains drop downs listing areas worked.
c5:c25 contains drop downs listing activities.
One of the areas in the drop down is Leave_Snack.
There are 5 activities associated with this area.
What they are supposed to do is when they select Leave_Snack, is to also include the activity. (Snack/Cleanup, Leave Other, Leave Family...etc)
Sometimes they forget.
When the form is submited (basically copied and saved to a different sheet), I want a warning to pop up saying that they forgot to put an activity with their Leave_Snack.
I put this at the beginning of the submit code, but it doesn't seem to recognize anything from a dropdown list. Am I missing something?
In a production reporting spreadsheet, users fill in their daily activities via drop downs.
b5:b25 contains drop downs listing areas worked.
c5:c25 contains drop downs listing activities.
One of the areas in the drop down is Leave_Snack.
There are 5 activities associated with this area.
What they are supposed to do is when they select Leave_Snack, is to also include the activity. (Snack/Cleanup, Leave Other, Leave Family...etc)
Sometimes they forget.
When the form is submited (basically copied and saved to a different sheet), I want a warning to pop up saying that they forgot to put an activity with their Leave_Snack.
I put this at the beginning of the submit code, but it doesn't seem to recognize anything from a dropdown list. Am I missing something?
Code:
Dim mycell As Range
Dim myrange As Range
Set myrange = Range("b5:b25")
For Each mycell In myrange
If Range(mycell).Value = "Leave_Snack" Then
If Range(mycell).Offset(, 1).Value = "" Then GoTo error2
End If
Next