Private Sub MSFlexGrid1_SelChange()
Dim intR As Integer, intC As Integer
Dim intStepR As Integer, intStepC As Integer
Dim str1 as String
If MSFlexGrid1.Row > MSFlexGrid1.RowSel Then
intStepR = -1
Else
intStepR = 1
End If
If MSFlexGrid1.Col > MSFlexGrid1.ColSel Then
intStepC = -1
Else
intStepC = 1
End If
For intR = MSFlexGrid1.Row To MSFlexGrid1.RowSel Step intStepR
For intC = MSFlexGrid1.Col To MSFlexGrid1.ColSel Step intStepC
str1 = str1 & MSFlexGrid1.TextMatrix(intR, intC) & "; "
Next intC
Next intR
MsgBox Left(str1, len(str1) - 3)
End Sub