Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to take information froma user form and submit it to my sheet 1
and every time a new record is entered it must go on to a new row. can anyone help?! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Darren
Place the code in the userform of the button that you will be using to add the info Private Sub CommandButton1_Click() Dim nextrow As Integer nextrow = FirstBlankRow(1, 1) Cells(nextrow, 1) = txtEmployeeName Cells(nextrow, 2) = txtSSN Cells(nextrow, 3) = txtAddress Cells(nextrow, 4) = txtCity End Sub Function FirstBlankRow(KeyColumn As Integer, startrow As Long) As Long Dim i As Long i = 0 Do While ActiveSheet.Cells(startrow + i, KeyColumn).Text < "" i = i + 1 Loop FirstBlankRow = startrow + i End Function Bob "Darren" wrote: I am trying to take information froma user form and submit it to my sheet 1 and every time a new record is entered it must go on to a new row. can anyone help?! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating form on sheet 1 and having info move to sheet 2 | Excel Discussion (Misc queries) | |||
how to get a data form to fill you own exel sheet (was data-form | Excel Worksheet Functions | |||
passing a variable from sheet to form to another sheet | Excel Programming | |||
Copy my active sheet to a new sheet and open with an input form | Excel Programming | |||
Is it possible to open the VBA form with a link in a sheet and to pass variable from a cell to the VBA form? | Excel Programming |