+ Reply to Thread
Results 1 to 6 of 6

User Form entry for Daily record keeping

  1. #1
    Registered User
    Join Date
    01-10-2022
    Location
    US
    MS-Off Ver
    2016
    Posts
    11

    User Form entry for Daily record keeping

    Hi,

    I am trying to create a user form to capture a data point for each employee on a shift per day. I can create the form and understand how to link it to create a data log. What I am trying to figure out is how to take a a list of names (~30) and assign a text box to each name. Right now I have a label of 30 names running vertically, I would like a text box to the right of each name that I can enter the data and then save it to a data tab. I am not sure how to get the name to record to the data sheet.

    I tried something like this : ws.Cells(1, iColumn).Value = Me.Label.Value

    I am sure this is not the correct way to create this form, so any ideas will help! Thanks

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: User Form entry for Daily record keeping

    Can you attach your file? See yellow banner at the top of the page.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    01-10-2022
    Location
    US
    MS-Off Ver
    2016
    Posts
    11

    Re: User Form entry for Daily record keeping

    Example sheet attached, names removed and shortened
    Attached Files Attached Files
    Last edited by WIFG; 07-26-2022 at 09:36 PM.

  4. #4
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    6,986

    Re: User Form entry for Daily record keeping

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-10-2022
    Location
    US
    MS-Off Ver
    2016
    Posts
    11

    Re: User Form entry for Daily record keeping

    Logit,

    The names are not changing, I am not looking to input names each time I complete the form, rather have one line dedicated to each name already listed and tie that with a data point which is entered.

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: User Form entry for Daily record keeping

    To make this easiest your labels, containing the employee names, and the textboxes, where the user enters data, should be named systematically. That is the first label should be something like LabelEmployee1 and the textbox should be TextBox1. (You have holes in the numbers, and some are out of order.) Then you can have a loop to easily store the data.

    I'm not clear on why you showed your sample results on Sheet1 instead of Data, where you said you wanted them. But my understanding is that the results should be written to Data.

    Also, you said the employee names are always the same. Is it correct that you want them hard-coded as your UserForm labels, rather than load them from the worksheet? If so how will you ensure that the userform matches the employee list on the worksheet? You only have 12 lines on the userform but 43 employees in the worksheet.

    You also have stray line feed characters in your label captions. I tried to clean those up but you'll have to go over them.


    I strongly recommend to everyone that they use Option Explicit and declare variables. Doing so prevents a lot of bugs and runtime errors.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to Modify a row in a data Entry form without adding a new record
    By anisali in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-25-2021, 02:40 PM
  2. User form add record
    By Bennasy23 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-14-2020, 06:22 AM
  3. Keeping daily forcast record for whole month
    By jp16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-29-2019, 11:30 PM
  4. Replies: 4
    Last Post: 11-27-2018, 02:06 PM
  5. [SOLVED] Verify that record dosen't exist on user form text box entry
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-16-2014, 05:23 PM
  6. Add next record using user form
    By rajeev.raj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-26-2010, 02:15 AM

Tags for this Thread

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