Populate userform with records from current row

后端 未结 3 986
臣服心动
臣服心动 2021-01-25 06:16

I have a userform with several textboxes, radio buttons, dropdowns, etc. When a user creates a new entry, the data is saved on the Data sheet, with one record occupying one row.

3条回答
  •  Happy的楠姐
    2021-01-25 07:02

    If you have one Button on your sheet to call the form, then just use something like this:

    me.TextBox1.value = Cells(ActiveCell.Row, 2).Value 'ActiveCell.Row returns the row number of the current cell
    

    So the only command the button has is UserForm1.Show

提交回复
热议问题