Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default change event problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default change event problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default change event problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default change event problems

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default change event problems

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
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
MenuBar & Event problems Graham F Excel Discussion (Misc queries) 1 May 7th 06 10:26 AM
Change event and calculate event Antje Excel Programming 1 March 29th 05 09:03 PM
Problems with event handlers Italian Job Excel Programming 2 November 12th 03 01:26 AM
change event/after update event?? scrabtree23[_2_] Excel Programming 1 October 20th 03 07:09 PM
If... Then Loop problems in Worksheet Event TB[_3_] Excel Programming 2 August 4th 03 08:45 AM


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

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

About Us

"It's about Microsoft Excel"