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

x
?
Solved

Detecting Which ScrollBar In a VSFlexGrid

Posted on 2000-03-15
3
Medium Priority
?
759 Views
Last Modified: 2013-12-25
Within a VSFlexGrid there is a Scroll Event which is fired whenever the user uses either the vertical or the horizontal.  I want to be able to tell which one it is since I want to execute some code only when the vertical scroll bar is used.  There is no parameter in the event itself and I can't seem to locate any properties.  Has anyone done/know how to do this?
0
Comment
Question by:JEGB
[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
3 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 2620173
You should be able to use the .TopRow and .LeftCol properties to determine which way the scroll event has occurred.

If you store the initial values of these on the form_load or other populate.

intLeftCol = Grid.LeftCol
intTopRow = Grid.TopRow

In the Scroll event you can check:

Sub Grid_Scroll()
  IF intLeftCol <> Grid.LeftCol Then
    'Code for horiz scroll
    intLeftCol = Grid.LeftCol
    'Set for next scroll
  End If
  If intTopRow <> Grid.TopRow Then
    'Code for vertical scroll
    intTopRow = Grid.TopRow
    'Set for next scroll
  End If
End Sub
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 400 total points
ID: 2689071
jegb, I am posting an answer to see if this has worked for you.
0
 

Author Comment

by:JEGB
ID: 2708608
Ta Tim, forgot to accept your answer, many thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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

670 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