Click to See Complete Forum and Search --> : flexgrid beginer question


mikledet
November 15th, 1999, 03:41 PM
Hello,
I want to set active cell in a flexgrid conrol by code and not with a mouse click event.
I tried to set the col and row properties:
MSflexgrid1.row = 1
MSflexgrid1.col = 1
But this just has no efect.

Any pointers as well msdn pointers will be welcome.
Thanks.

czimmerman
November 16th, 1999, 01:34 AM
I added the following to a form load event:

With MSFlexGrid1
.Rows = 4
.Cols = 4

.Col = 3
.Row = 3
End With

This made the bottom/right most cell the active cell, as can be seen by the dotted lines around the cell.

Charlie Zimmerman
http://www.freevbcode.com

mikledet
November 16th, 1999, 02:44 AM
hmm, well, I have tow questions about what you wrote:
First in what way is it different from what I wrote - other than the style?
Second, I tried what you wrote - and it did nothing as well - the cell is not selected with the dotted frame...
But, when using break point during run time the line in the "with" block gave the next tooltip text:
.col = <object variable or with block variable not set>
What am I supposed to set?

Ravi Kiran
November 16th, 1999, 04:50 AM
Is the FlexGrid properly installed? It should be, because it comes default with VB.

That code should work, otherwise

Or is the variable Name (of the Grid) different? "With block not set" means the variable is not pointing to Valid data at the moment.

RK