User Form to auto populate one field based on cell value corresponding to a database

  • Hi All, i will try to explain my issue as objectively i can and show where i have reached till now.

    • I have certain database in sheet1 with column as name, place, city, code and Hobby ( Hobby column is my problem focus read below)
    • In sheet 2 cell (1,1) i have dropdown list of names coming from Sheet 1 "name column" and related output coming from sheet1 ( based on dropdown i choose in cell(1,1))
    • Problem : - I want to create a user form which when activated automatically picks name filed from sheet2 cell (1,1) and one filed (Hobby) and give me option to change it when click save.
    • Enactment.- User choose a name in sheet 2 in cell 1,1 - list of details come in sheet. Now he click update (which fires userform) - this userform already have the name he has choosen and show hobby field. User update hobby filed and click save. Whithout going to sheet 1 the hobby filed is updated. Now he pick another name in sheet2 cell 1,1 and does the same.
    • Basic problem i am looking is how to link userform filed to one particular cell in another sheet. Below is the simple code i have written, but it need the name filed to be filled manually ....

    Edited once, last by Carim: Added Code Tags ().

  • Hi,

    I was able to solve it on by doing simple adjustments on my code. I would not be able to attach example due to some my organization's policy.

    I simply solved it by putting making value of input box as cell dependent.

    TextBox1.Value = Worksheets("Sheet2").Range("$A$1").Value

    So whenever A1 cell of sheet2 changes it changes the inputbox value which inturn change value of another cell. :)

Participate now!

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