Creating a data entry form

  • Thread starter Thread starter Sheila
  • Start date Start date
S

Sheila

I created a document that looks like a registration form
and now I want to create addtional records. Example- I
want to register 10 people but I want to keep it in the
same worksheet or book but be able to continue to add if I
get over 10 people with out cutting and pasting. Just like
in MS Access.
 
Try something like this to transfer data from your form to you
database.

'------------------------------------------------
Sub Add_New_Record()
Dim InputForm As Worksheet
Dim Database As Worksheet
Dim Torow As Long
'--------------------
Set Database = Worksheets("Database")
Set InputForm = Worksheets("Inputform")
'find last row
Torow = Database.Range("A65536").End(xlUp).Row + 1
Database.Cells(Torow, 1).Value = InputForm.Range("A1").Value
Database.Cells(Torow, 2).Value = InputForm.Range("A2").Value
End Sub
'---------------------------------------------------
 
Back
Top