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: 24
Default Worksheet Change Event With Validation List

I am in the middle of writing a macro that runs on any change to a specific
cell containing a validation list.

I tested that it worked with each bit of extra code that I added, and it
worked fine for a while, but then it started to crash Excel and I cant find
out what caused it.

And even more peculiar, if I start writing from scratch, the event is no
longer triggered by changing the cell by the Validation list.

I have attached the offending code, in case there is something there that
has altered a setting within Excel that I am not aware of.
If I create a Change Event in a new workbook it works with the Validation
List, so cant be the fact that I have Excel 2002.

Thanks for any help that you can give

Kris

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False

If Target.Address = Range("PF_ContractType").Address Then
Select Case Target.Value
Case "Fixed Price"
'Multiplier Label Change
With Range("PF_MultiplierLabel")
.Value = "Labour Revenue Multiplier on Bare"
.Font.Bold = True
.Font.ColorIndex = 0
.Font.Italic = False
End With
'Remove Equivalent Multiplier Formula
With Range("PF_Multiplier")
.Value = Null
.Locked = False
End With

Case "Time Charge"
'Multiplier Label Change
With Range("PF_MultiplierLabel")
.Value = "Equivalent Labour Revenue Multiplier on Bare"
.Font.Bold = False
.Font.ColorIndex = 48
.Font.Italic = True
End With
'Add In Equivalent Multiplier Formula
With Range("PF_Multiplier")
.Formula =
"=IF(SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier))=0,,PF_TotalLabour_Rev/SUM(PF_BareLabour,(PF_ContractLabour/PF_BurdenMultiplier)))"
.Locked = True
End With
Case Else
'Nothing
End Select
End If
Application.EnableEvents = True
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
Validation Procedure with a worksheet change event Bhupinder Rayat Excel Worksheet Functions 2 October 3rd 07 05:18 PM
Data Validation Listbox and the Worksheet Change Event RASENT Excel Programming 0 June 17th 05 09:26 PM
Sheet change event and list validation question Nick Excel Programming 1 October 21st 04 01:20 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


All times are GMT +1. The time now is 03:04 AM.

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"