Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hey guys, i got a problem
i am using colours to trigger events in my code, everything works fine apart from the event triggered by green, heres my code: If Weekday(Now()) = vbWednesday Then For Each CellWed In RngWed If WorksheetFunction.IsNumber(CellWed.Value) And CellWed.Value <= 17.59 And CellWed.Font.Color < RGB(255, 0, 0) And CellWed.Font.Color < RGB(0, 255, 0) And CellWed.Font.Color < RGB(0, 0, 255) Then CountEmp = CountEmp + 1 ElseIf CellWed.Font.Color = RGB(255, 0, 0) Then CountHalfDay = CountHalfDay + 1 ElseIf CellWed.Value = "Holiday" Then CountHoliday = CountHoliday + 1 ElseIf CellWed.Font.Color = RGB(0, 255, 0) Then CountSickHD = CountSickHD + 1 ElseIf CellWed.Value = "Sick" Then CountSick = CountSick + 1 ElseIf CellWed.Value = "A/A" Or CellWed.Value = "A\A" Then CountAabsence = CountAabsence + 1 ElseIf CellWed.Font.Color = RGB(0, 0, 255) Then CountAabsenceHD = CountAabsenceHD + 1 ElseIf CellWed.Value = "U/A" Or CellWed.Value = "U\A" Then CountUnabsence = CountUnabsence + 1 ElseIf CellWed.Value = "S/U" Or CellWed.Value = "S\U" Then CountSuspend = CountSuspend + 1 End If Next CellWed i know what you may be thinking i am selecting the wrong font colour green, just to let you know i am selecting the green that is 4 columns in from the left and one row down on the excel colour palette, funnily enough the one tagged "green" both the blue and red work fine. why does this code not work? please help!! The Noob. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
whats wrong with this? | Excel Discussion (Misc queries) | |||
Whats Wrong With This | Excel Programming | |||
Whats wrong with this? | Excel Programming | |||
Whats Wrong with this?? | Excel Worksheet Functions | |||
Whats wrong? | Excel Programming |