tags:

views:

7

answers:

0

Hi

Im trying to create a form in Excel and am using macro for the first time.

I want a form in sheet1 that when submitted it records the answers in a database in sheet2. i have managed this but when i fill in the form for the second time it overwrites the row in the databse and im not sure how to make it auotmatically use the next row down. im sure its very simple but its driving me mad!

This is what i have so far

Sub Button9_Click()

Worksheets("Database").Range("A6").Value = Worksheets("Form").Range("E3")

Worksheets("Database").Range("A6").Value = Worksheets("Form").Range("E3")

Worksheets("Database").Range("B6").Value = Worksheets("Form").Range("E4")

Worksheets("Database").Range("C6").Value = Worksheets("Form").Range("e7")

Worksheets("Database").Range("d6").Value = Worksheets("Form").Range("e8")

Worksheets("Database").Range("e6").Value = Worksheets("Form").Range("e9")

Worksheets("Database").Range("f6").Value = Worksheets("Form").Range("e10")

Worksheets("Form").Range("e3").ClearContents

Worksheets("Form").Range("e4").ClearContents

Worksheets("Form").Range("e7").ClearContents

Worksheets("Form").Range("e8").ClearContents

Worksheets("Form").Range("e9").ClearContents

Worksheets("Form").Range("e10").ClearContents

End Sub

Please help, am i doing this correctly

Naomi"