Input from user form put into specified cell.

I need to set up a user form that when you put information in it and click the add button it will put it into a certain cell.

Here is what I am trying to do.

I have 13 generators and each one has a fuel tank that we need to keep track of how may inches of fuel is inside. In my user form I have a place for each tank. When the user clicks add on the form I want it to go into a specified cell. So if 13 is entered under Generator 1 that information would go under cell B2 (no matter how many times you change it. If it is for generator 1 it goes under B2). Generator 2 has an entry of 4, that would need to go into cell C2 and so on.

Any help would be appreciated.



Answer this question

Input from user form put into specified cell.

  • ahmedsaad4

    If you are using textboxes on the userform to input fuel levels then one way
    would be to set the
    ControlSource property of each textbox to the cell
    on the worksheet where the data should appear.

    So if textbox1 is for generator 1 its ControlSource property would be Sheet1!B2,
    for textbox2 it would be Sheet1!C2 etc. This way you don't need an Add button
    and any change on the worksheet is automatically reflected in the control.


  • Keren S

    Nice one Navajo.

  • Input from user form put into specified cell.