We help IT Professionals succeed at work.

Which event will occur?

pleasure
pleasure asked
on
hi,
Which event will occur when i press arrow key for MSHFlexGrid object beside SelChange event?

thanks




Comment
Watch Question

keydown/keypressed
Valliappan ANSenior Tech Consultant
CERTIFIED EXPERT

Commented:
Hope it'll be in this sequence:

LeaveCell
EnterCell
RowColChange
KeyUp

Hope, also, there is a possibility of scroll event occurring, if toprow or leftcol property is changed.

Hope it helps.
there is a keydown first
Use

Debug.Print "some string"

to output something to the debug window to determine the sequence....

Author

Commented:
thanks for the reponse,

KeyDown, KeyUp and KeyPress will only occured when i press key like A, B , C etc....but not when i press arrow key. when i pressed arrow key.. only SelChange event will occur...

is there any other opinion??? thanks..

Author

Commented:
Basically i need an event that will occur when i press arrow key for MSHFlexGrid object but the event will not invoked by properties such as Col or ColSel.
 
why, why not use the one on the colsel? explain maybey whe are looking in the wrong direction

Author

Commented:
colsel will invoke SelChange event and this cause me problem...:(

by the way.. anybody know how to get the text in MsFlexGrid with using Col.
Currently i use this method to retrieve the text -->

MyFlexGrid.col = 0
sGroupID = Trim(MyFlexGrid.Text)
MyFlexGrid.col = 1
sGroupDesc = Trim(MyFlexGrid.Text)
don't know the FlexGrid very well but doesn't this work?

MyFlexGrid.col = 0
MyFlexGrid.Text = sGroupID
MyFlexGrid.col = 1
MyFlexGrid.Text = sGroupDesc
Senior Tech Consultant
CERTIFIED EXPERT
Commented:
you can access cell values like this, w/o changing row or col properties:

MyFlexGrid.TextMatrix(row, col)

Explore More ContentExplore courses, solutions, and other research materials related to this topic.