Results 1 to 7 of 7
  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoFill Input Box (2002)

    Hi,
    I have a userform with an input box that I would like to be auto-filled with the Excel user name, but also have the ability to overtype it. Is this possible?

    Also, I have a combo-box with 4 names, would it be possibe to be able to type a-n-other name into the box, (I'm guessing probably not)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AutoFill Input Box (2002)

    You can populate a text box in the Initialize event of the userform:

    Private Sub UserForm_Initialize()
    Me.txtUser = Application.UserName
    End Sub

    If the Style property of a combo box is set to 0 - fmStyleDropDownCombo, the user can type a value into the text box part of the combo box that is not an entry in the list part. The value will not be added to the list however, at least not automatically.
    If the Style property is set to 2 - fmStyleDropDownList, the user can only select items from the list.

  3. #3
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoFill Input Box (2002)

    I may be close, or i may be.......

    With Me.cmbType
    .AddItem "Session A"
    .AddItem "Session B"
    .ListIndex = 0
    .fmStyleDropDownCombo = 0
    End With


    Added later, No, ignore that, "ding ding", lightbulb moment. Thanks

  4. #4
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoFill Input Box (2002)

    fmStyleDropDownCombo / fmStyleDropDownList ......... I presume this is the same, so must be a typo? Or am I still up the wrong tree?

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AutoFill Input Box (2002)

    No, one ends in Combo, the other in List. And the first has value 0, the second has value 2. So they're different.

  6. #6
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoFill Input Box (2002)

    Individual styles, obviously individually named. <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30> Thanks

  7. #7
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoFill Input Box (2002)

    Hi Nathan

    Does this thread <post#=725,823>post 725,823</post#> or the link to a suggestions from Steve help at all

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

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