Solved

MSFlexGrid Question

Posted on 2002-04-29
3
189 Views
Last Modified: 2010-05-02
How do you programmaticly highlight an entire selected row in a MSFlexGrid Control. I have this code but it only highlights the second column in the row, and i need the whole row selected.

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    With MSFlexGrid1
        .ColSel = .Cols - 1
        .RowSel = .MouseRow
    End With
End Sub
0
Comment
Question by:Maxim10553
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Expert Comment

by:cnealy
ID: 6977799
Try it without :

     .ColSel = .Cols - 1

That may be why you are only selecting one column.
0
 

Expert Comment

by:RAJz
ID: 6978298
use this code

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 Then
  With MSFlexGrid1
    If .ColSel = .Cols - 1 And .Row = .MouseRow Then
        MsgBox "ok"
    Else
        MsgBox "no"
    End If
  End With
End If
 
End Sub


RAJz
0
 
LVL 38

Accepted Solution

by:
PaulHews earned 50 total points
ID: 6978302
Try:
Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
   With MSFlexGrid1
       .Col= 0
       .Row = .MouseRow
       .ColSel = .Cols - 1
       .RowSel = .MouseRow
   End With
End Sub
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month4 days, 22 hours left to enroll

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question