H
Howard
Excel 2010
Sheet 1 B1 has a drop down with Don, Kim, Bob & " ".
What is the proper syntax to get Case Is = "Kim" & Case Is = "Bob" to work properly. Case Is = "Don" works but probably because it is on sheet1.
Thanks.
Regards,
Howard
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim TheDon As Range, TheKim As Range, TheBob As Range
Set TheDon = Sheets("sheet1").Range("C110")
Set TheKim = Sheets("sheet2").Range("E1:F10")
Set TheBob = Sheets("sheet3").Range("G1:H10")
Select Case ActiveCell.Value
Case Is = "Don"
TheDon.Select
MsgBox "Don's stuff"
Case Is = "Kim"
TheKim.Select
MsgBox "Kim's stuff"
Case Is = "Bob"
TheBob.Select
MsgBox "Bob's stuff"
Case Is = " "
MsgBox "Blank (space) stuff"
End Select
End Sub
Sheet 1 B1 has a drop down with Don, Kim, Bob & " ".
What is the proper syntax to get Case Is = "Kim" & Case Is = "Bob" to work properly. Case Is = "Don" works but probably because it is on sheet1.
Thanks.
Regards,
Howard
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
Dim TheDon As Range, TheKim As Range, TheBob As Range
Set TheDon = Sheets("sheet1").Range("C110")
Set TheKim = Sheets("sheet2").Range("E1:F10")
Set TheBob = Sheets("sheet3").Range("G1:H10")
Select Case ActiveCell.Value
Case Is = "Don"
TheDon.Select
MsgBox "Don's stuff"
Case Is = "Kim"
TheKim.Select
MsgBox "Kim's stuff"
Case Is = "Bob"
TheBob.Select
MsgBox "Bob's stuff"
Case Is = " "
MsgBox "Blank (space) stuff"
End Select
End Sub