+ Reply to Thread
Results 1 to 5 of 5

Active X control

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Active X control

    How do I select an active x control (Drop down list), when I move to the sheet that contains the control? If the cursor is in a different position and the user starts to type the first few letters of the intended selection of the drop-down list, the letters are entered in the cell where the cursor is.
    Thanks in advance
    Last edited by Aland2929; 03-14-2012 at 08:33 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Active X control

    Why are you using an ActiveX control, I would use Data validation on the sheet.

    Record a macro whilst selecting the control, then adapt that code into the WorkSheet_Activation code
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Active X control

    Thanks Roy. Data validation does not allow the user to type the first letter or letters to move to a selection quickly. I inserted the following code in the target sheet which works fine if you click the sheet, but I want to attach code to a button in a different sheet so that the list box is activated when the sheet is activated?

    Private Sub Worksheet_Activate()
    Listbox1.Activate
    End Sub
    Thanks in advance

  4. #4
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Active X control

    Recording a macro does not show any code when selecting the listbox?

  5. #5
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: Active X control

    I have solved my problem. The original code selected a cell after the sheet was activated. If I simply activate the sheet, then the [Worksheet_Activate] code selects the Listbox.

+ 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