+ Reply to Thread
Results 1 to 2 of 2

Creating a tab order on vba embedded toolbox controls

  1. #1
    Registered User
    Join Date
    08-10-2004
    Posts
    8

    Creating a tab order on vba embedded toolbox controls

    I have several Toolbox Control comboboxes & text boxes on an excel sheet that need to be used interacted with in sequence (from cboSecurity to cboCoupon). I would like to tab from one embedded form to the next but they do not have that ability built in. I have been trying to catch the keypress event and process the KeyCode value:

    Private Sub cboSecurity_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
    If KeyCode = 9 Then
    Sheets("Trade").cboCoupon.Select
    End If
    End Sub

    The selection occurs, but it is selected as if you were in design mode. What I am trying to achieve is selecting the next combobox (cboCoupon) and have the cursor be in the box so I can navigate the list by using the keyboard arrows. Any ideas?

  2. #2
    K Dales
    Guest

    RE: Creating a tab order on vba embedded toolbox controls

    Instead of .Select try .Activate
    --
    - K Dales


    "afiack" wrote:

    >
    > I have several Toolbox Control comboboxes & text boxes on an excel sheet
    > that need to be used interacted with in sequence (from cboSecurity to
    > cboCoupon). I would like to tab from one embedded form to the next but
    > they do not have that ability built in. I have been trying to catch the
    > keypress event and process the KeyCode value:
    >
    > Private Sub cboSecurity_KeyDown(ByVal KeyCode As MSForms.ReturnInteger,
    > ByVal Shift As Integer)
    > If KeyCode = 9 Then
    > Sheets("Trade").cboCoupon.Select
    > End If
    > End Sub
    >
    > The selection occurs, but it is selected as if you were in design mode.
    > What I am trying to achieve is selecting the next combobox (cboCoupon)
    > and have the cursor be in the box so I can navigate the list by using
    > the keyboard arrows. Any ideas?
    >
    >
    > --
    > afiack
    > ------------------------------------------------------------------------
    > afiack's Profile: http://www.excelforum.com/member.php...o&userid=12915
    > View this thread: http://www.excelforum.com/showthread...hreadid=525821
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1