Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a drop down box (data validation list) in cell E8 and want to run an
edit on the D8 (offset 1 column) if E8 equals "flat" I cannot figure out why my change event won't fire... How do I set up a change event around this code and where should the code be located? THANKS! If Target.Value = "flat" Then ActiveCell.Offset(0, 1) = "No Discount Margin" End If |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
Are you using Excel97? In Excel 97, the use of a data validation list will not trigger a change event. Yoo could try linking the cell of interest to another cell and monitoring the change in the dependent cell with the Worksheet_Calculate event. If you are using a later version of Excel, check that events have not been turned off: In the immediate window type: Application.EnableEvents = True and hit Enter. --- Regards, Norman "John" wrote in message ... I have a drop down box (data validation list) in cell E8 and want to run an edit on the D8 (offset 1 column) if E8 equals "flat" I cannot figure out why my change event won't fire... How do I set up a change event around this code and where should the code be located? THANKS! If Target.Value = "flat" Then ActiveCell.Offset(0, 1) = "No Discount Margin" End If |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Norman, I appreciate the response... I just figured it out I had the text
FLAT in my worksheet and "flat" in the code... when I changed the code to all caps ("FLAT") it worked.... go figure. Thanks again. "Norman Jones" wrote: Hi John, Are you using Excel97? In Excel 97, the use of a data validation list will not trigger a change event. Yoo could try linking the cell of interest to another cell and monitoring the change in the dependent cell with the Worksheet_Calculate event. If you are using a later version of Excel, check that events have not been turned off: In the immediate window type: Application.EnableEvents = True and hit Enter. --- Regards, Norman "John" wrote in message ... I have a drop down box (data validation list) in cell E8 and want to run an edit on the D8 (offset 1 column) if E8 equals "flat" I cannot figure out why my change event won't fire... How do I set up a change event around this code and where should the code be located? THANKS! If Target.Value = "flat" Then ActiveCell.Offset(0, 1) = "No Discount Margin" End If |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may want to change the code to look like:
If lcase(Target.Value) = "flat" Then Then FlAt, FLAt, flaT, ... will all work. John wrote: Norman, I appreciate the response... I just figured it out I had the text FLAT in my worksheet and "flat" in the code... when I changed the code to all caps ("FLAT") it worked.... go figure. Thanks again. "Norman Jones" wrote: Hi John, Are you using Excel97? In Excel 97, the use of a data validation list will not trigger a change event. Yoo could try linking the cell of interest to another cell and monitoring the change in the dependent cell with the Worksheet_Calculate event. If you are using a later version of Excel, check that events have not been turned off: In the immediate window type: Application.EnableEvents = True and hit Enter. --- Regards, Norman "John" wrote in message ... I have a drop down box (data validation list) in cell E8 and want to run an edit on the D8 (offset 1 column) if E8 equals "flat" I cannot figure out why my change event won't fire... How do I set up a change event around this code and where should the code be located? THANKS! If Target.Value = "flat" Then ActiveCell.Offset(0, 1) = "No Discount Margin" End If -- Dave Peterson |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave
"Dave Peterson" wrote: You may want to change the code to look like: If lcase(Target.Value) = "flat" Then Then FlAt, FLAt, flaT, ... will all work. John wrote: Norman, I appreciate the response... I just figured it out I had the text FLAT in my worksheet and "flat" in the code... when I changed the code to all caps ("FLAT") it worked.... go figure. Thanks again. "Norman Jones" wrote: Hi John, Are you using Excel97? In Excel 97, the use of a data validation list will not trigger a change event. Yoo could try linking the cell of interest to another cell and monitoring the change in the dependent cell with the Worksheet_Calculate event. If you are using a later version of Excel, check that events have not been turned off: In the immediate window type: Application.EnableEvents = True and hit Enter. --- Regards, Norman "John" wrote in message ... I have a drop down box (data validation list) in cell E8 and want to run an edit on the D8 (offset 1 column) if E8 equals "flat" I cannot figure out why my change event won't fire... How do I set up a change event around this code and where should the code be located? THANKS! If Target.Value = "flat" Then ActiveCell.Offset(0, 1) = "No Discount Margin" End If -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MenuBar & Event problems | Excel Discussion (Misc queries) | |||
Change event and calculate event | Excel Programming | |||
Problems with event handlers | Excel Programming | |||
change event/after update event?? | Excel Programming | |||
If... Then Loop problems in Worksheet Event | Excel Programming |