A dblclick event loads a userforms textboxes from 1 to 46
textboxes 27,29,31,33,37,39 and 41 are expiry dates, I am trying to highlight these if due with 60 days
I have tried various forms of this but just cant seem to be able to reference the array value only
When I try using "For j =" a message box appears saying Expected "To"
For j = Array(27, 29, 31, 33, 35, 37, 39, 41)
If DateValue("Ddtxt_" & j).Value - Now() <= 60 Then
Me("Ddtxt_" & j).BackColor = vbRed
Next j
End If
Any pointers appreciated
the code to load the userform is
With DDlst_1
For i = 0 To 46
If i <> 19 Then
Me("Ddtxt_" & i + 1).Value = .List(.ListIndex, i)
End If
Next i
End With
Bookmarks