Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Grid

Posted on 2002-07-29
4
Medium Priority
?
161 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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 …
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

705 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