Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Would someone be so kind to provide a VBA code I can assign to a command
button on a user form that will transfer the data just entered in the form's fields to a list located on a separate worksheet within the same workbook? I would like each click of the button to update the list by adding new row and then to clear the user form preparing it for new data entry. I don't want to use MS Access for that function. Thanks a lot! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There's a sample file here that stores data on a hidden worksheet:
http://www.contextures.com/excelfiles.html#UserForm Under 'UserForms', look for 'Parts Database' Plamen A. Vachovski wrote: Would someone be so kind to provide a VBA code I can assign to a command button on a user form that will transfer the data just entered in the form's fields to a list located on a separate worksheet within the same workbook? I would like each click of the button to update the list by adding new row and then to clear the user form preparing it for new data entry. I don't want to use MS Access for that function. -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In my example your command button (CommandButton1)
loads data from ten text boxes and a combo box into the next available row on the designated sheet...its quite easy to follow. The text boxes are named textbox1, textbox2,..., textbox10 Finally the value of a combbox is also added. Private Sub CommandButton1_Click() Dim target As Range Dim i As Long target = Worksheets("Sheet1").Range("A65000").End (xlUp).Offset(1, 0) target.Value = Format$(Date, "dd-mm-yyyy") For i = 1 To 10 target.Offset(0, i).Value = _ Controls("textbox" & i).Text Controls("textbox" & i).Text = "" Next target.Offset(0, 11).Value = ComboBox1.Value End Sub This should get you started Patrick Molloy Microsoft Excel MVP -----Original Message----- Would someone be so kind to provide a VBA code I can assign to a command button on a user form that will transfer the data just entered in the form's fields to a list located on a separate worksheet within the same workbook? I would like each click of the button to update the list by adding new row and then to clear the user form preparing it for new data entry. I don't want to use MS Access for that function. Thanks a lot! . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create auto updating data validation list from all worksheet names | Excel Worksheet Functions | |||
Updating mailing list data | Excel Discussion (Misc queries) | |||
Updating a list | Excel Discussion (Misc queries) | |||
updating data in rows from master list | Excel Programming | |||
updating data in rows from master list | Excel Programming |