Pseudo-code - since I haven't used VB6 in a while and I never used the DataGrid...

VB Code:
  1. Dim strResult As String
  2. for each row in the data grid
  3.     for each column in the row
  4.         replace "!" & column name in strResult with value from column
  5.     next
  6.     'do something with strResult which now has all the values from current row
  7. next