I am trying to have the inputs from a form, populate a database on a seperate sheet of the same workbook. I need the database to start at a specific cell. I have a heading on the top and the first two columns have formulas. I have been playing around with my code and it seems that the formulas are setting the start point for form inputs. example, column A has formulas down to row 10, then the inputs will start at C11. Note, in the process of working on this issue I screwed something up and it no longer indexes for the next entry.
Here is what I have so far, I was hoping someone could help me over this hurdle.
Private Sub cmdsubmit_Click()
' goto database
Sheets("database").Select
Dim input1 As String
Dim RowNum As Long
input1 = txt_input1.Text
' Put the data in the current worksheet:
If Cells(3, 3).Value = "" Then
RowNum = 1
Else
RowNum = ActiveSheet.UsedRange.Rows.Count + 1
End If
Cells(RowNum, 3).Value = input1
'go home
Sheets("home").Select
Unload form1
End Sub
thanks in advance for the help...
Here is what I have so far, I was hoping someone could help me over this hurdle.
Private Sub cmdsubmit_Click()
' goto database
Sheets("database").Select
Dim input1 As String
Dim RowNum As Long
input1 = txt_input1.Text
' Put the data in the current worksheet:
If Cells(3, 3).Value = "" Then
RowNum = 1
Else
RowNum = ActiveSheet.UsedRange.Rows.Count + 1
End If
Cells(RowNum, 3).Value = input1
'go home
Sheets("home").Select
Unload form1
End Sub
thanks in advance for the help...