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: VB Code: With flxMyGrid .Row = 1 .Col = .Cols - 1 .ColSel = 0 End With Is this what you were after?
With flxMyGrid .Row = 1 .Col = .Cols - 1 .ColSel = 0 End With
Use [CODE] tags and rate useful posts VB: MSDN VBnet DevX vbAccelerator DB: W3Schools SQL TechOnTheNet's Oracle/PLSQL ConnectionStrings Misc (IT): Use XP look (manifest) in your apps (sample) MZ-Tools (free and cool VB add-in) Deploy your apps with Inno Setup Misc: Zeitgeist Movie ... so make the best of this test and don't ask why, it's not a question, but a lesson learned in time...
Originally Posted by swtransaction How would I click the first flexgrid using a command button? I tried: flxMyGrid.Row = 1 (did not work) You were half way there. VB Code: Private Sub Command1_Click() flxMyGrid.Row = 2 Call flxMyGrid_Click End Sub
Private Sub Command1_Click() flxMyGrid.Row = 2 Call flxMyGrid_Click End Sub
Tips, Examples & Tutorials: A valuable forum tool • Generate unique TreeView keys • TreeView with "open" and "closed folder" icons • Time code using GetTickCount • How to trap the Tab key • Scroll a form • NumberBox ActiveX control • Color a ListView row • An InputBox form • How to use SaveSetting and GetSetting • A program registration scheme • Spellcheck a Textbox • Resize controls • Open Windows Explorer at Last Visited Path • A Blackjack Game • Count lines of code • Private Message Viewer • Copy/Paste VB Code • Paste VB Code Add-In • Insert Procedure Names Add-In • A calculator for the game of Spider • My review of REALbasic 2008 • VB6 Debug Tutorial • Picture/Video Viewer • VBF Photo Contest Winners 2009 - 2016
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)
Originally Posted by swtransaction 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?
You have called it, now you have to actually define it: VB Code: Private Sub MSFlexGrid1_Click() Text1.Text = "do it here" End Sub
Private Sub MSFlexGrid1_Click() Text1.Text = "do it here" End Sub
gavio, your code does not click the flexgrid.
Originally Posted by MartinLiss 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?
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
Forum Rules