#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call user form from ThisWorkbook; close file if form closed XP Excel Programming 2 July 20th 07 07:04 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 01:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"