+ Reply to Thread
Results 1 to 5 of 5

Auto fill specific cells from userform

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Auto fill specific cells from userform

    Hi

    I am trying to create a spreadsheet to record vehicle mileage at the end of each week, however sometimes we cannot input the information until 2 or 3 weeks later. I am looking for a way to auto fill specific cells when the user inputs the information using a userform.

    On the attached spreadsheet:

    The first button input an 'Empty Row' ready for the new week and current mileage

    The second button opens the userform to select the vehicle, date and input the mileage

    I cannot figure out how to have the mileage inserted into the correct cell irrespective of when we insert the information.

    Any help to modify the code would be very much appreciated

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JamesT1; 05-25-2009 at 02:14 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: Auto fill specific cells from userform

    Why is it a problem? Simply add the information then sort by dates, you don't need to add rows either doing it this way
    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 Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Auto fill specific cells from userform

    I've amended your code to add date & the userform. You should remember when naming controls to use a prefix that identifies the type of control - g cbo for ComboBox. This makes it easier to understand the code.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    430

    Re: Auto fill specific cells from userform

    royUK

    Thanks for the advice,,,

    I was getting hung up and fixated on the code,,,,,, the master spread sheet takes up to 200 vehicles and as I plan on using this sheet for a few years I was thinking it would get rather crowded with numbers.

    After reading your first reply I revisited it taking out most of the code and altering it so that only the current and last 3 weeks will show,,,, hiding the rest from view

    now works the way I wanted it too

    many thanks

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

    Re: Auto fill specific cells from userform

    The form that I amended should work better for you as well.

+ 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