Darren DICK
tripledee at bigpond.com
Mon Nov 28 15:49:40 CST 2005
Hi all I apologise for the OT So feel free to respond to my personal email if you wish I am setting up an excel document that has a column that records pass/fail/not tested - Only 1 of 3 possibilities What I want is the default to be "Not tested" and the backcolour of that cell to be say...orange The... If a user types F or Fail or fail I want the backcolour to go red If a user types P or Pass or pass I want the backcolour to go green In access I would write a function something like this F_SetBackColour(strControlName as string, strControlValue as string) select case strControlValue Case "F" or "fail" or "fail" Forms!someForm(strControlName).backcolor = 255 Case "P" or "Pass" or "pass" Forms!someForm(strControlName).backcolor = vbGreen Case Else Forms!someForm(strControlName).backcolor = vbOrange end select End function And in the after update of each relevant control I would have something like Private sub SomeControl_AfterUpdate() F_SetBackColour(me.currentControl, me.currentControl.value) End sub To achieve this in Excel what would I have to do? Many thanks in advance Darren