Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a page with many objects (textboxes, Option
buttons, comboboxes). There are more objects than can fit on the display screen. I have used the code below to tab, shift/tab back and forth between objects on the page Does anyone know how to code to accomplish the following: When a field which I have progressivly tabbed into, is beyond the display screens view (below), I would like the screen to shift down the page so that the object which I have tabbed into, which has the focus (e.g. textbox1.activate) is in my view without me having to scroll down, or do any extra keystrokes. Private Sub cboEnergyType_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) Select Case KeyCode Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyUp Application.ScreenUpdating = False bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp) If Application.Version < 9 Then Sheet1.Range ("A1").Select If bBackwards Then With Me.txtStopPayComments .Activate .SelStart = 0 .SelLength = Len(.Text) End With Else With Me.txtAcctNo .Activate .SelStart = 0 .SelLength = Len(.Text) End With End If Application.ScreenUpdating = True End Select End Sub Thank you in advance God bless you |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I fix the position of an object on the screen? | Excel Discussion (Misc queries) | |||
DISPLAY TWO DIFFERENT SHEETS ON SCREEN | Excel Discussion (Misc queries) | |||
How to add a screen tip to an object (no a hyperlink)? | Excel Discussion (Misc queries) | |||
The screen should not move to focus on column using when typing | Excel Discussion (Misc queries) | |||
Highlight/Select contents of object with focus | Excel Programming |