The most likely issue is that you have put the function call in the wrong place.

It needs to be after the text has been added to the grid.

I very rarely use data controls, so I don't know where that would be. It would be best to create a new thread in the VB6 forum to ask where it should go.