Booking forms

D

danielle88

I'm creating a spreadsheet for a business and i need to create a booking
form and from that be able to save the customers information. I've
created the booking form, and created a button to save the customer
information, assinging a macro for it to save. The problem is when the
buttons clicked, regardless of if the information has changed in the
booking form, it overwrites the first customer, it copies to the same
cells.

Any ideas on what i could do?
I'm not allowed to use Acess, Excel only.
Thank you.
 
M

Mike

Private Sub CommandButton1_Click()
Const col As String = "A"
Dim ws As Worksheet
Dim lastRow
Set ws = Worksheets("Sheet1")
lastRow = ws.Cells(Rows.Count, 1).End(xlUp).Row
ws.Range(col & lastRow).Offset(1, 0).Value = TextBox1.Text
End Sub
 
G

Gord Dibben

You could use the built-in Data>Form to enter and manipulate your data.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top