LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 536
Default select case syntax to other sheets

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Case Syntax Minitman Excel Programming 12 January 19th 10 01:59 AM
Select Case syntax Alan Beban Excel Programming 14 July 15th 07 11:51 PM
Select Case for Active Worksheet syntax. mikeburg[_43_] Excel Programming 2 December 2nd 05 12:26 AM
Syntax for Select Case Susan Hayes Excel Programming 4 November 30th 05 10:49 AM
Select Case syntax Susan Hayes Excel Programming 2 December 4th 04 10:42 PM


All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"