Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an UserForm which staff uses to initiate entries on a
WorkSheet. I now need to activate that same UserForm and populate the fields with data from a selected row, so staff can edit enties. If I click on a Cell in a row of data, how do I: 1. Capture the row number for use in the formula - say R is Rows UserForm.ADate.Value = Worksheets("Contacts").Cells(R,2).Value 2. Load the UserForm with that data from the selected Row. That's enough for now. Appreciate any directions. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pete,
Private Sub UserForm_Initialize() TextBox1.ControlSource = "$A$" & ActiveCell.Row TextBox2.ControlSource = "$B$" & ActiveCell.Row End Sub will tie the Textbox1 to cell A and row. Now any changes to the text box will input directly to the cell and anything that is already in the cell will appear in the textbox. Complete the sub with all your objects. Then use UserForm1.Show in your macro. -- sb "Pete T" wrote in message om... I have an UserForm which staff uses to initiate entries on a WorkSheet. I now need to activate that same UserForm and populate the fields with data from a selected row, so staff can edit enties. If I click on a Cell in a row of data, how do I: 1. Capture the row number for use in the formula - say R is Rows UserForm.ADate.Value = Worksheets("Contacts").Cells(R,2).Value 2. Load the UserForm with that data from the selected Row. That's enough for now. Appreciate any directions. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
multiple user in excel to edit a userform | Excel Discussion (Misc queries) | |||
Edit exsisting data with userform | Excel Discussion (Misc queries) | |||
DDE - View Pane and Allow Edit | Excel Discussion (Misc queries) | |||
Code to edit directly in cells from userform | Excel Programming | |||
Code to edit directly in cells from userform | Excel Programming |