View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Minitman Minitman is offline
external usenet poster
 
Posts: 293
Default Type Mismatch Error


I've changed the code slightly, but have run out of ideas as to what
to try next
__________________________________
Public Sub rDailyColor()
'Formatting of "Daily" sheet
Dim rDailyItem As Range
Dim rInputPaidItem1 As Range
Dim rInputPaidItem2 As Range
Dim rInputTrigger As Range
' On Error Resume Next
For iDay = 1 To 31
For iDayItem = 1 To 27
Set rDailyItem = _
Range("rDaily" & iDay & "_" & iDayItem)
Set rInputPaidItem1 = _
Range("rInput" & iDay).Offset(iDayItem, _
7)
Set rInputPaidItem2 = _
Range("rInput" & iDay).Offset(iDayItem, _
9)
Set rInputTrigger = _
Range("rInput" & iDay).Offset(iDayItem, _
34)
Select Case rInputTrigger
Case """"
With rDailyItem
.Interior.ColorIndex = xlNone
.Font.FontStyle = "Bold"
End With
Case Else
Select Case rInputPaidItem2
Case """"
Select Case rInputPaidItem1
Case """"
With rDailyItem
.Interior.ColorIndex = 38 '38
.Font.FontStyle = "Bold"
End With
Case Else
With rDailyItem
.Interior.ColorIndex = xlNone
.Font.FontStyle = "Bold"
End With
End Select
Case Else
With rDailyItem
.Interior.ColorIndex = xlNone
.Font.FontStyle = "Bold"
End With
End Select
End Select
Next iDayItem
Next iDay
On Error GoTo 0

End Sub
__________________________________________________ ___________________________

Any ideas as to what needs to be done to correct this problem?

Any suggestions are welcome and appreciated.

-Minitman