ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User form (https://www.excelbanter.com/excel-programming/404461-user-form.html)

wagz

User form
 
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

Bob Phillips

User form
 
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)



"wagz" wrote in message
...
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




Charles Chickering

User form
 
Wagz, this application would be much better suited for a database. You can do
it in Excel but it will require more work. This link should help you find the
last row:
http://www.beyondtechnology.com/geeks012.shtml
--
Charles Chickering

"A good example is twice the value of good advice."


"wagz" wrote:

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



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com