Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() the macro is being called twice because when you change G6 is causes a 2nd event of the macro to occur. disableEvent should solve the problem. I also made some improvements to the code. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$L$11" And Target.Count = 1 Then Application.EnableEvents = False Select Case Target.Value Case 1: Range("G6") = "Cat" Case 2: Range("G6") = "Dog" Case 3: Range("G6") = "Fish" End Select Application.EnableEvents = False End If End Sub -- joel ------------------------------------------------------------------------ joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=149424 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Update cell contents based on worksheet name | Excel Discussion (Misc queries) | |||
Macro to update contents of cell | Excel Programming | |||
Can I use cell contents to update footers in excel? | Excel Discussion (Misc queries) | |||
How do I update contents of activeX combobox? | Excel Programming | |||
Update - Include cell contents in filename automatically | Excel Programming |