Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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("C1:D10") 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select Case Syntax | Excel Programming | |||
Select Case syntax | Excel Programming | |||
Select Case for Active Worksheet syntax. | Excel Programming | |||
Syntax for Select Case | Excel Programming | |||
Select Case syntax | Excel Programming |