Solved

Grid

Posted on 2002-07-29
4
155 Views
Last Modified: 2010-04-24
Could anyone tell me/show me how to find out if any rows have been selected or not on an MXFlexGrid??

Thanks
Scott
0
Comment
Question by:SCOTT78
  • 2
4 Comments
 
LVL 20

Expert Comment

by:hes
ID: 7186110
Have you tried:

Private Sub MSFlexGrid1_SelChange()
 MsgBox MSFlexGrid1.RowSel
End Sub
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 7186760
Actually the rows between .row and .rowsel are selected.
0
 

Author Comment

by:SCOTT78
ID: 7187655
Is there anything that I can use that will say:

 With the rows that have been selected then do this..

Thanks
0
 
LVL 38

Accepted Solution

by:
PaulHews earned 50 total points
ID: 7187866
As an example
dim intRow as integer, intRowSel as integer
With flxGrid
  if .row < .rowsel then
    intRow = .Row
    intRowSel = .RowSel
  else
    intRow = .RowSel
    intRowSel = .Row
  end if

  for i = intRow to intRowSel
    .TextMatrix(i, 0) = "new value"
  next i
End with

In practice, caching .row and .rowsel is a good idea because depending which way the mouse drags, .rowsel could be smaller than .row.  Also if you are changing certain cell properties, (.cellbackcolor etc.) the only way to do it is to change .row and .rowsel to select the cells you wish to change.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

792 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