Solved

Grid

Posted on 2002-07-29
4
156 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
[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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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.
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…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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