Forum Discussion
vthomeschoolmom
14 years agoSuper Contributor
This is a built in control that ships with VB6. As such you can access the MSDN Library help files for VB6. I see some properties for you to investigate
ColSel - Returns or sets the start or end column for a range of cells
RowSel - Returns or sets the start or end row for a range of cells
Col, Row Properties (MSHFlexGrid)
Returns or sets the coordinates of the active cell in an MSHFlexGrid. These properties are not available atdesign time.
Syntax
object.Col [=number]
object.Row [=number]
Col, Row, Text Properties (MSHFlexGrid) Example
This example puts the word "Here" into the current cell, changes the active cell to the third cell in the third row and puts the word "There" into this new active cell. To run the program, press f5, and then click the grid.
Note If you are using the MSFlexGrid, substitute "MSHFlexGrid1" with "MSFlexGrid1."
Private Sub Form1_Load ()
MSHFlexGrid1.Rows =8
MSHFlexGrid1.Cols =5
End Sub
Private Sub MSHFlexGrid1_Click ()
' Put text in current cell.
MSHFlexGrid1.Text ="Here"
' Put text in third row, third column.
MSHFlexGrid1.Col =2
MSHFlexGrid1.Row =2
MSHFlexGrid1.Text ="There"
End Sub
I don't know if this helps, but if you can get a copy of the MSDN Library, that probably would.
I am not super familiar with this particular grid...
Good luck.
ColSel - Returns or sets the start or end column for a range of cells
RowSel - Returns or sets the start or end row for a range of cells
Col, Row Properties (MSHFlexGrid)
Returns or sets the coordinates of the active cell in an MSHFlexGrid. These properties are not available atdesign time.
Syntax
object.Col [=number]
object.Row [=number]
Col, Row, Text Properties (MSHFlexGrid) Example
This example puts the word "Here" into the current cell, changes the active cell to the third cell in the third row and puts the word "There" into this new active cell. To run the program, press f5, and then click the grid.
Note If you are using the MSFlexGrid, substitute "MSHFlexGrid1" with "MSFlexGrid1."
Private Sub Form1_Load ()
MSHFlexGrid1.Rows =8
MSHFlexGrid1.Cols =5
End Sub
Private Sub MSHFlexGrid1_Click ()
' Put text in current cell.
MSHFlexGrid1.Text ="Here"
' Put text in third row, third column.
MSHFlexGrid1.Col =2
MSHFlexGrid1.Row =2
MSHFlexGrid1.Text ="There"
End Sub
I don't know if this helps, but if you can get a copy of the MSDN Library, that probably would.
I am not super familiar with this particular grid...
Good luck.