Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I wrote a VBA to paint a color bar chart if more than 3 days. Below is my code but it is not working, no painting, Don't know why, need your help Thanks Daniel ---------------------------------------------------------------------------- Sub painting Dim Rng7 as range Dim Cnt7 as integer Cnt7=1 For Each Rng7 In Range(.Cells(2, 6), .Cells(12, 6)) If Rng7.Value = "" Then Exit For 'If IsEmpty(Rng7) Then 'not working if empty cell Set Pts = ActiveChart.SeriesCollection(1).Points(Cnt7) Pts.HasDataLabel = True If (DateDiff("d", Rng7, Now)) 3 Then Pts.Fill.Patterned Pattern:=msoPatternDarkUpwardDiagonal End If Cnt7 = Cnt7 + 1 End If Next Rng7 end sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
For..Next loop error | Excel Programming | |||
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error | Excel Programming | |||
Error in loop | Excel Programming | |||
loop error | Excel Programming | |||
loop error | Excel Programming |