+ Reply to Thread
Results 1 to 15 of 15

New Entry UserForm

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    New Entry UserForm

    I'm not sure how too set this up, here is a example of what I would like too do. This would make adding data too my list easy, I use Vlookup on my main form and it works great, had a lot of help on that from this site. I might be asking too much for this, if so tell me too go away. LOL. Thanks for any inputs you can give me.
    Attached Files Attached Files
    Last edited by zplugger; 04-15-2009 at 05:55 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: New Entry UserForm

    What do you use VLOOKUP for?

    I've added code to populate a combobox with film types, tidied up the form & added code to add the entry to the database

    see the database form here

    http://www.excel-it.com/vba_examples.htm

    It shows how to add data & remove entries
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Thanks royUK, this is perfect. On my main wookbook I use Vlookup too show me all the mystery movies. I have buttons too show me all the different types, they come up in a list box. One more question, I keep the range tight in my columns of my different types so my dropdown list box had no empty area. Lets say my range on sheet 2 column F is a F10, can this be increased by 1 with new entries so they will show up in my listbox ok. If my range is 10 and I have 15 movies it will only show me 10. Not sure this even can be done with new entries, If not I can change the ranges.
    Thanks.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: New Entry UserForm

    I would only have one column for type, this can then be filtered to display individual types.

    Likewise, I wouldn't use VLOOKUP in VBa. I would use .Find - see the example I pointed you to.

    I'm not sure what you mean with your last question, try attaching the workbook so that I can see what you mean

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Thanks again, doing a new form too learn your steps, not sure what you did with sheet3. I see the names and how they fill the dropdown, my new project has a problem, I think it has something too do with page 3

  6. #6
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Here is my learning book, it does not work. The one royUK did works perfect, I'm trying too learn how. I think I missing something about page 3 ?

    Thanks
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Me.cboType.List = rSource.Value
    This I think is where the problem is , Not sure what Me.cboType is

  8. #8
    Registered User
    Join Date
    04-14-2009
    Location
    Queensland
    MS-Off Ver
    MSOffice 2003
    Posts
    11

    Re: New Entry UserForm

    Quote Originally Posted by zplugger View Post
    ... I keep the range tight in my columns of my different types so my dropdown list box had no empty area. Lets say my range on sheet 2 column F is a F10, can this be increased by 1 with new entries so they will show up in my listbox ok. If my range is 10 and I have 15 movies it will only show me 10. Not sure this even can be done with new entries, If not I can change the ranges.
    Thanks.
    ...maybe use
    Please Login or Register  to view this content.
    seen it somewhere -used to fill range in Sheet1 based on what is in cell A1.

  9. #9
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: New Entry UserForm

    Why have you changed the form?

    1. You have removed the combobox that I added & replaced it. The combobox that I added was named cboType - you haven't renamed yours so the code fails. It's a good prctice to rename controls with a name that indicates type & use. Same applies to the Enter Button.

    I also arranged all the input controls so that they were in line, in my opinion if you are creating a userform then you should make it look profeesional, controls should be aligned neatly & size should be uniform.

    I have changed the source for the movie types to use the header cells of the database, if you add a type to the end it will be added to the form. I have also replaced the textbox for the movie rating to a ombobox. The next movie number is generated automatically. Also, added code to clear the form
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Wow nice job on this royUK, I made the other form too practice and learn how too do it right. I see where I was making mistakes now, I really like the way it inputs the movie number. The only problem I have is, can we make it so when you enter the movie the types go too the next empty cell from the top. He is another example of whats happens on page two in rows E,F,G. I have another dropdown on my main workbook to show me what in the types, if there is a empty cell it will not read the new entry.

    Thank You on this "supper" Userform
    Attached Files Attached Files
    Last edited by zplugger; 04-15-2009 at 01:27 PM.

  11. #11
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Not sure but is their a way to format a column not too have empty cells.

  12. #12
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: New Entry UserForm

    Quote Originally Posted by zplugger View Post
    Wow nice job on this royUK, I made the other form too practice and learn how too do it right. I see where I was making mistakes now, I really like the way it inputs the movie number. The only problem I have is, can we make it so when you enter the movie the types go too the next empty cell from the top. He is another example of whats happens on page two in rows E,F,G. I have another dropdown on my main workbook to show me what in the types, if there is a empty cell it will not read the new entry.

    Thank You on this "supper" Userform
    If you do that it will create a confusing database all entries should be on one line. As I suggested in my post last night I would have only one column for type, you can then sort & filter by type - this would be a more efficient & useful database.

    If you really want to continue
    Please Login or Register  to view this content.
    Last edited by royUK; 04-15-2009 at 01:40 PM.

  13. #13
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Thanks royUK, I will try a redo my workbook. All of my main database is on the same line, I have another userform that reads data in the different types. I know this probaly isn't the right way but it works ok for me. The new entry works great in putting in the data, but if I have a blank space in the other type column it will not read. I know what your saying and I will begin a new workbook. I just didn't know if we could enter data too next empty cell in the type columns, my main base would stay on the same line.
    Thanks

  14. #14
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: New Entry UserForm

    Without seeing the whole workbook I can't really suggest a better way to do this

  15. #15
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: New Entry UserForm

    Thanks for all your help on this royUK, I will wait until fall too redo my list. With summer here its hard too find a lot of spare time. I love learning all the stuff you can do with excel. One last question on this, by looking at the last example I sent you is it possible to run a marco to move the data up in columns E,F,G. I would not move any of the data in A,B,C,D, everything inputs perfect with your UserForm. I can go too E,F,G now and sort the columns and move the data up so I have no empty cells. I have 10 different types so it takes a lot of time.

    Again Thank You Very Much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1