It would help if you had Strict and Explicit on, something you've been told numerous times.
An experiment / hint
Code:Dim colour(2) As Color colour(0) = Color.FromName("Blue") colour(1) = Color.FromName("red") For Each s As String In From c In colour Select c.Name If [Enum].IsDefined(GetType(KnownColor), s) Then 'Color ok Stop Else Stop End If Next




Reply With Quote