If you enter that formula manually, does it work?
As far as the event not firing, I suspect you have an error in your code, so
when the event end prematurely, events are disabled.

Signature
Regards,
Tom Ogilvy
> I am in the middle of writing a macro that runs on any change to a specific
> cell containing a validation list.
[quoted text clipped - 45 lines]
> With Range("PF_Multiplier")
> .Formula =
"=IF(SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier))=0,,PF_TotalL
abour_Rev/SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier)))"
> .Locked = True
> End With
[quoted text clipped - 4 lines]
> Application.EnableEvents = True
> End Sub
Kris_Wright_77 - 24 Jan 2006 15:53 GMT
Tom
Thanks for the quick response.
The Formula works fine if entered manually, as that was where I created it
initially. Its just that under certain conditions the formula isnt
appropriate.
Although it was when I tested that the macro would correctly insert the
formula that the event last fired using a validation list
I initially did think that it was because the code ended prematurely with
the events off, but I have run a macro to turn them back on, and it still
doesnt fire on a change using a validation list, but will on anything entered
manually.
I have also done some further testing, and it seems that the problem is
confined to just the one sheet in the book.
I have added some change events to another sheet in the workbook, and they
fire properly when using a Validation list.
I presume I have inadvertently changed a property of the worksheet, but I
cant find it anywhere.
Thanks for any further help that you can give.
Kris
> If you enter that formula manually, does it work?
>
[quoted text clipped - 63 lines]
> > Application.EnableEvents = True
> > End Sub
Tom Ogilvy - 24 Jan 2006 15:58 GMT
Try running Rob Bovey's code cleaner utility on your workbook. It is a free
download at
http://www.appspro.com
If that doesn't fix it, then it might be time to think about replacing the
sheet as a minimum or moving everything to a new workbook.

Signature
Regards,
Tom Ogilvy
> Tom
> Thanks for the quick response.
[quoted text clipped - 78 lines]
> > > With Range("PF_Multiplier")
> > > .Formula =
"=IF(SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier))=0,,PF_TotalL
> > abour_Rev/SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier)))"
> > > .Locked = True
[quoted text clipped - 5 lines]
> > > Application.EnableEvents = True
> > > End Sub
Kris_Wright_77 - 24 Jan 2006 17:41 GMT
Tom
I ran the code cleaner, and it didn't help.
So resorted to making a copy of the problem sheet, and discovered that it
relates to the Conditional Formatting that I had applied to range with the
formula.
Once I deleted the Conditional Formatting from the original sheet, the
change event started running again with the validation list.
I dont understand why it should make a difference, unless the UDF I have is
incorrect.
Function IsFormula(Cell)
Application.Volatile
IsFormula = Cell.HasFormula
End Function
But for now I will just use code to change the format.
Thanks for all your help
Kris
> Try running Rob Bovey's code cleaner utility on your workbook. It is a free
> download at
[quoted text clipped - 3 lines]
> If that doesn't fix it, then it might be time to think about replacing the
> sheet as a minimum or moving everything to a new workbook.
Kris.
Worksheet_change event doesn't work correctly if you change value from
drop down list.
It works if you type value manually.
It' s a bug in excel since I even don't rememeber and nobody wants to
fix it.
> I am in the middle of writing a macro that runs on any change to a specific
> cell containing a validation list.
[quoted text clipped - 54 lines]
> Application.EnableEvents = True
> End Sub