I am not sure that the
FormattedValue
can be
Nothing
, since it is the value to be displayed, which for a blanked cell would probably be
String.Empty
. The same applies to
DBNull
only more so, if you see what I mean.
If you want to test for DBNull then I would suggest using
e.Value
.
Otherwise add
AndAlso Not String.IsNullOrEmpty(e.FormattedValue.ToString) Then Exit Sub