How would I click the first flexgrid using a command button? I tried:
flxMyGrid.Row = 1 (did not work)
Printable View
How would I click the first flexgrid using a command button? I tried:
flxMyGrid.Row = 1 (did not work)
Don't quite understand you... try this instead:
Is this what you were after?VB Code:
With flxMyGrid .Row = 1 .Col = .Cols - 1 .ColSel = 0 End With
You were half way there.Quote:
Originally Posted by swtransaction
VB Code:
Private Sub Command1_Click() flxMyGrid.Row = 2 Call flxMyGrid_Click End Sub
yes that helps, two issues:
if there are no rows it gives an error
it selects it, does not click it (when a row is clicked it populates a text box)
You're talking about gavio's code, right?Quote:
Originally Posted by swtransaction
You have called it, now you have to actually define it:
VB Code:
Private Sub MSFlexGrid1_Click() Text1.Text = "do it here" End Sub
gavio, your code does not click the flexgrid.
Yes... at first i missunderstood him. I was talking about your code. He/you had called it, now he has to define it. That's probobally why nothing happens. Am i wrong? ;)Quote:
Originally Posted by MartinLiss
I'm back. Actually it wasn't click I was needing after all.
flxMyGrid_SelChange
the added If flxLastWorked.Rows > 1 Then
Thanks. You guys got me on the right path, appreciate it!
Now that we've helped you, you can pull down the Thread Tools menu and Mark Thread Resolved, so people will know you got your answer ;)