+ Reply to Thread
Results 1 to 5 of 5

Userform - Auto-populate text box

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Userform - Auto-populate text box

    Hi There,

    I think what I'm trying to achieve is pretty simple, but I've had no luck so far.

    Basically I have two text boxes. textbox1 allows the user to input a date, textbox2 is supposed to auto-populate a date which adds 6 weeks (42 days) to the date in textbox1. I tried the below code but had no such luck .

    Thanks for any help in advance!

    Please Login or Register  to view this content.
    Last edited by revenge4ash89; 01-23-2012 at 09:47 AM.

  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: Userform - Auto-populate text box

    Try
    Please Login or Register  to view this content.
    TextBox entries by default are seen as a text string, so it must be converted to a format that Excel sees as a date
    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: Userform - Auto-populate text box

    This will give a warning if a non date is entered in TextBox1

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-16-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Userform - Auto-populate text box

    That's working perfectly. Thank you again RoyUK! I really appreciate the help.

  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: Userform - Auto-populate text box

    Glad it helped, please mark this Thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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