Textbox value retrieval

  • Hello i would like to know whether there is possibility for a textbox in a userform to rememeber the value which entered previously. For Example if i type INDIGO in textbox 1 and click on command button the value will be passed to the worksheet so next time if i type IN then the word INDIGO should be suggested.Is there any vba code for that.
    thanks in advance

  • Re: Textbox value retrieval

    Use a combobox.

    If the ComboBox ListIndex is -1 when you write the value to the worksheet then that is a new value - add it to the ComboBox List. ComboBoxes will automatically suggest the matching items in the list as you type in the edit box.

    With a little extra code, you can limit the number of items, or save the list to the registry (or on a hidden worksheet) so it can be reloaded next time the userform is loaded

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!