Solved

Grid

Posted on 2002-07-29
4
147 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now