Help with a macro
So you want a data input form on one sheet and a database on the other. that
sounds like a good way to proceed. Taht being said you are not so much
looking to link the data form to the database but rather allow the end user
to append data to the database base on their form inputs.
My recommendation would be to add a button to the input form that copies the
relevant values to the next available row on the database sheet. The code
could be similar to this...
Private Sub CommandButton1_Click()
Dim rng As Range
Set rng = Sheet2.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0)
With rng
.Value = IIf(Application.IsText(.Offset(-1, 0).Value), 0, _
.Offset(-1, 0).Value) + 1 'index number
.Offset(0, 1).Value = Sheet1.Range("A1").Value
.Offset(0, 2).Value = Sheet1.Range("A2").Value
End With
End Sub
--
HTH...
Jim Thomlinson
"NEHicks" wrote:
I have a form that people enter daily information in. I need to be able to
retain the data each day. So, my thought was to link cells to a second
worksheet. How do I make the 2nd worksheet switch to the next row after the
last column is filled in so that the next day has a new row to take data in?
|