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 No response to change_event

Overlooking the obvious again, I suppose.

This used to work just fine. I dug it out of my archive to adapt to another use and its a no go.

If it type in Don, Bob or Kim into B1 - Enter nothing happens. It does not add and name the three ranges and of course then it will not GoTo any of them either.

I have confidence in the code as I believe I got help with it here from Claus or Garry.

Code is in sheet 1 module.
(And tried it in a standard module also, same no-go)

I tried it a couple times with EnableEvents = True to assure that was not the problem, no help there.

Thanks.
Howard

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
'Application.EnableEvents = True
Dim TheDon As Range, TheKim As Range, TheBob As Range

If Target.Address < "$B$1" Then Exit Sub

ActiveWorkbook.Names.Add Name:="TheDon", _
RefersTo:=Sheets("sheet1").Range("C1:D10")
ActiveWorkbook.Names.Add Name:="TheKim", _
RefersTo:=Sheets("sheet2").Range("E1:F10")
ActiveWorkbook.Names.Add Name:="TheBob", _
RefersTo:=Sheets("sheet3").Range("G1:H10")

Select Case Target.Value

Case Is = "Don"
Application.Goto "TheDon"
MsgBox "Don's stuff"

Case Is = "Kim"
Application.Goto "TheKim"
MsgBox "Kim's stuff"

Case Is = "Bob"
Application.Goto "TheBob"
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
OnTime Change_Event macro AND copy to sheet2 macro trouble Howard Excel Programming 7 June 3rd 13 01:59 PM
How do I transform a word response to a numeric response? kanegaro Excel Discussion (Misc queries) 0 January 11th 08 05:08 PM
How do I set up a daily call out response response register? Pule Excel Worksheet Functions 1 October 7th 07 01:34 PM
Combobox Change_Event JimRWR Excel Programming 10 April 23rd 07 08:58 PM
Change_Event Hawk Excel Programming 4 October 16th 03 04:06 PM


All times are GMT +1. The time now is 10:44 PM.

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"