Autofill TB in Userform based on input in other TB

  • Hi!


    Despite coming to this site often for help this is my first time posting so I hopefully I don't offend anyone with this post!


    I'm very new to VBA and just discovering the advantages using userforms to input large amounts of data that I have in my job so apologies if this has been covered elsewhere, I'm so new I find it difficult to translate similar covered advice unless my specific issue is discussed.


    I have two text boxes, one which automatically updates to today's date when the userform is opened, the other that requires an input to record what financial period we are in. I would like the second box to automatically test the date and depending what set of dates we are between, automatically fill with the correct period.


    For example period 11 runs from 01/05/17 - 28/05/17. I would like the period text box to automatically know this is period 11 and should I change the date manually automatically skip to the appropriate period.


    I currently don't have any code as I haven't made any attempt to make this work but if required I can post the form's code.


    Thanks in advance for any help.

  • Re: Autofill TB in Userform based on input in other TB


    Here's an idea. Create a Sheet with the Dates and Date Period like in this example. The Userform populates today's date and searches my Date Sheet for today's Date and returns the assigned Date Period in the Column next to it.


    forum.ozgrid.com/index.php?attachment/72428/


    I hope this helps point you in the right direction :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!