+ Reply to Thread
Results 1 to 17 of 17

VBA Userform Information Autopopulate Specific Cells then Loop?

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Lightbulb VBA Userform Information Autopopulate Specific Cells then Loop?

    Hi Everyone!

    EXTREMELY new to doing any macros and VBA coding within excel but have found these forums particularly helpful and have been able to tweak many to fit my needs without learning exactly how anything works...... so now I need some help since I cant find a similar situation.

    I have a userform with 36 text boxes that I have gotten each to fill in a corresponding cell in excel once the OK button is clicked.

    I am trying to figure the coding for the next time the userform is filled it will fill the new information in the same column but +5 rows down. and so on and so fourth. I have a note on the userform that all areas must be filled in thinking that it would be able to detect values and move on but idk if that is neccessary.

    To explain I am making a timesheet that is kind of dummy proof for supervisors where they will click a button that opens a userform they fill in names, and hours for specific days then hit ok and repeat for the next employee. This document is then made into a .PDF and sent into the office for timecards. Since I am SUPER new to this please use color coding for areas where I need to fill in information from my spreadsheet.

    Please Login or Register  to view this content.
    THIS IS MY CODE SO FAR.... sorry if its terrible but its what I could piece together from other threads and it works....... just needs that extra step... Also, this worksheet will eventually be copied and renamed Week Ending 7-27-19 etc. any way to write this so it will work on the next sheet??


    Thanks everyone!!! Cheers!

    -Matt
    Last edited by HazMattTeam; 07-20-2019 at 04:33 PM.

  2. #2
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Question Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    just working saturdays love it!
    Last edited by HazMattTeam; 07-20-2019 at 04:01 PM.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    The code can be shortened to this:
    Please Login or Register  to view this content.
    Regarding the other questions, it would be easier to help if you could post a copy of your file (de-sensitized if necessary).
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Thanks, There was an error when I attempted that. How would i go about posting a copy? I dont see an add attachment spot?

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Click the "Go Advanced" button. Then scroll down a bit and click "Manage Attachments".

  6. #6
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Ok. figured out your instructions.. by the way thanks a ton. Really appreciate everything
    Attached Files Attached Files
    Last edited by HazMattTeam; 07-20-2019 at 05:36 PM.

  7. #7
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Ok back in the hotel from the jobsite ready when you are

  8. #8
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810
    Quote Originally Posted by HazMattTeam View Post
    Ok back in the hotel from the jobsite ready when you are
    I’m away from home right now. I won’t be able to respond until tomorrow.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,421

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Administrative Note:

    HazMattTeam - we don't expect you to bump threads more than once in 24 hours - it had been less than an hour since you last posted. Please remember that those who help here do so voluntarily and of their own goodwill. They live in many different time zones and many will be out at work right now if they are not asleep on the other side of the globe. This is not a paid 'service': members will help when they are ready and able to do so, and not 'on demand'. Please do not try to put pressure of time on anyone here: if you get the help you need today, that's fine, but you really should not count on it. Thanks for your understanding and patience.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  10. #10
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Try:
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Thanks Mumps!

    Definitely works for the current worksheet!
    The only part where it doesn't work is when I start adding new worksheets in the future (and I forgot the text box for AREA.Value in (e,8) i just saw this morning :S).
    Basically we just make a copy of 7-20-19 and rename it 7-27-19. When I did this the userform continued to push the data back into 7-20-19.
    Is there a way to rewrite:
    Please Login or Register  to view this content.
    so that it is the currently active sheet where the userform button was clicked?

    Much love for the help,
    Matt

  12. #12
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Try:
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    SOLVED!!!! thank you!

  14. #14
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    You are very welcome.

  15. #15
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    OOOOO NOOOO!!!!

    I messed up the input somewhere..... and like a dummy i forgot to save...
    everything shifted up two cells for some reason!!!
    Attached Files Attached Files

  16. #16
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    Enter the dates in J5:P5 so those cells are not blank.

  17. #17
    Registered User
    Join Date
    07-20-2019
    Location
    Wisconsin
    MS-Off Ver
    2019
    Posts
    14

    Re: VBA Userform Information Autopopulate Specific Cells then Loop?

    SOLVED x2

+ 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. Autopopulate Vlookuped Cells with specific entries if condition is met
    By marcelkahn5 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-08-2018, 01:38 AM
  2. Userform that searches for a record to update a specific row's information
    By tweedyone in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-13-2017, 09:52 PM
  3. Edit Specific Information using UserForm
    By chergian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-18-2017, 07:25 PM
  4. Autopopulate (horizontally) cells in calendar via UserForm
    By john55 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 12-30-2016, 05:02 AM
  5. Replies: 4
    Last Post: 06-29-2014, 04:33 AM
  6. Macro to loop information into next cell from UserForm
    By mporres in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2013, 12:11 PM
  7. [SOLVED] Input Userform Data into Specific Cells & Loop?
    By shiftyspina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 07:00 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