+ Reply to Thread
Results 1 to 7 of 7

Automatic date in userform

  1. #1
    Registered User
    Join Date
    07-12-2010
    Location
    Guernsey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Red face Automatic date in userform

    Hi,
    I've created a userform and want one textbox to automatically enter today's date but in the form dd/mm/yyyy as opposed to the mm/dd/yyyy form it's in by default.
    Please help!
    oh and there will probably be a lot more pleas for help. I'm doing work experience and my boss has got me creating this form despite me telling him time and time again that I've never done any programming or anything like that in my life!
    THANKS
    Last edited by ImboJones; 07-12-2010 at 08:58 AM. Reason: solved

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Automatic date in userform

    Nothing like being chucked in at the deep end

    Pop this on the userform's code page (right click on the form background and select View Code):

    Please Login or Register  to view this content.

    Change the text box name as required.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    07-12-2010
    Location
    Guernsey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Automatic date in userform

    YAY! thank you. that's perfect.
    Next thing.
    I managed to get it to automatically enter an incrementing number for each new record. I know i'm being a bit picky, but i'd prefer for it to be in the form 00001 etc instead of just 1. can I do this?
    thanks again

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Automatic date in userform

    No problem.

    Can you post your code that you have already?

    Remember to use code tags.

    Dom

  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: Automatic date in userform

    Start a new thread for a totally different question
    Hope that helps.

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

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    07-12-2010
    Location
    Guernsey
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: Automatic date in userform

    Sure it's;
    Please Login or Register  to view this content.
    ...hope that comes out right. really sorry if not.

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Automatic date in userform

    If you post this in a new thread as Roy suggests I'll reply to that.

    Dom

+ 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