User form

W

wagz

I am creating a check-in excel sheet for a motel. In the sheet there is an
option for the actual "Check-in" that brings up a userform. The clerk would
then fill in the appr. cust info and then hit submit. Once the data is
submitted I would like to have it go to DB sheet that would enter the patrons
info accross the columns.

How do I make the userform code recognise that it needs to go to that sheet,
and then look for the next available row to start entering the info in?

Is there a way that I can have a lookup button on the userform that could do
a search based on the first name and then insert that info from the db to the
user form so the clerk wouldn't have to fill in the info each time? Or find
out that the patron should not be rented to again?

Any help in this matter would be greatly appriciated. Thanks in advance!

-Wagz
 
B

Bob Phillips

You don't need to go to the sheet, you can get the last row wit

With Worksheets("DB")

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row)
End With

and then you can use it like so

Worksheets("DB").Cells(LastRow + 1, "A").Value = TextBox1.Text

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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