Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 28, 2:06*pm, noname wrote:
On Nov 29, 12:02*am, noname wrote: Hi, I have a form with 2 frames on it. One on the left containing text Labels and the other frame on right containing autogenerated textboxes. the left frame has its scrollbar visible=false whereas the the right frame has its scrollbar visible=true. Using the right frame scrollbar, i can scroll the autogenerated textboxes as well as their corresponding labels lying in left frame, by coding both the frames SCROLL events. But the problem arises when i try to click inside any textbox, it moves to the first textbox in the right pane. my question is: How can i disable scrolling to first textbox everytime i click inside a textbox? i think the scroll events for both the frames is causing this to happen so need to disable the same temporarily, whenever i click a textbox in right frame, corresponding to its label lying in left frame. Anyone knows how to achieve this? The scroll code for the two frames is: Private Sub fra_SA_01_Scroll(ByVal ActionX As MSForms.fmScrollAction, ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single, ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle, ByVal ActualDy As MSForms.ReturnSingle) * * If blnEvents Then * * * * blnEvents = False * * * * fra_SA_02.ScrollTop = fra_SA_02.ScrollTop + ActualDy * * * * blnEvents = True * * End If End Sub Private Sub fra_SA_02_Scroll(ByVal ActionX As MSForms.fmScrollAction, ByVal ActionY As MSForms.fmScrollAction, ByVal RequestDx As Single, ByVal RequestDy As Single, ByVal ActualDx As MSForms.ReturnSingle, ByVal ActualDy As MSForms.ReturnSingle) * * If blnEvents Then * * * * blnEvents = False * * * * fra_BrandInfo_Outer_02.ScrollLeft = fra_BrandInfo_Outer_02.ScrollLeft + ActualDx * * * * fra_SA_01.ScrollTop = fra_SA_01.ScrollTop + ActualDy * * * * blnEvents = True * * End If End Sub It seems that on exiting the frame Fra_SA_01, the frame Fra_SA_02 scroll event resets it's scrollbar to the top. Has anyone come across this issue? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Move the cursor to end of data in textbox | Excel Programming | |||
Excel: Arrows scroll sheet instead of move cursor. How to switch | Excel Discussion (Misc queries) | |||
Move cursor to textbox in a userform | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming |