Hi billyboy,

Can you pls look at your code again... Something is missing I couldn't figure out what.

If (ColIndex = 0 And (Len(Trim(dgSample.Columns(1).text)) > 0) Or _
If (ColIndex = 1 And (Len(Trim(dgSample.Columns(0).text > 0) Then

Is this two If statements or one??? I even add an end if statement and it still give me an error message.

Thanks.