You wants for MsHflexgrid. But I do it with MsFlexGrid. It may be helpful to you.
rs.open "TableName"
for i=1 to msgrid.rows
rs.addnew
rs!id=msgrid.texmatrix(i,0)
rs!name=msgrid.texmatrix(i,1)
rs!address=msgrid.texmatrix(i,2)
rs.update
next
rs.close
I think you get the help