+ Reply to Thread
Results 1 to 4 of 4

Date not populating cell

  1. #1
    Registered User
    Join Date
    04-28-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Date not populating cell

    Hello,

    I have a userform which requires the user to enter the date a training course was completed. Initially I used DatePicker as I was running Excel 2010 and had that working, however the workbook I am creating will be used on about a dozen machines, all of which have different versions of Excel. To avoid needing calendar Add-ins to be downloaded and installed for this feature I decided to go the vba created calendar route. I am using one I found on this forum:
    http://www.excelforum.com/excel-gene...ml#post3443599

    It works well for me using the example spreadsheet provided in the post but I am having some difficulty incorporating it into my code. I believe I have imported the appropriate forms and modules because I can get the date populate to the Label Box on my userform but when I try to put the Date into the spreadsheet along with other data such as name and course duration, the name and course duration populate but the date cell remains blank and execution completes without error.

    I have tried playing around with the data type thinking I had some issue using the .Value attribute with a String but .Text gives me an error as does converting from String to Number format.

    I will attach the workbook but for a quick look, the portion of the code I believe that is not working is in here:

    Please Login or Register  to view this content.
    Training Classes Example Workbook.xlsm

    Thanks for your help,
    Michelle

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Date not populating cell

    Change your Format(sDateString, "mm/dd/yyyy")
    to

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Date not populating cell

    You could also change your calendar button (Remove) to have it as

    Please Login or Register  to view this content.
    But to each there own

    Excelnoub

  4. #4
    Registered User
    Join Date
    04-28-2014
    Location
    Orange County, CA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Date not populating cell

    Quote Originally Posted by Excelnoub View Post
    Change your Format(sDateString, "mm/dd/yyyy")
    to

    Please Login or Register  to view this content.
    Success! I think I will go with this option. Thanks Excelnoub.

+ 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. [SOLVED] Populating cell with a date after another cell has been populated
    By coach.32 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-24-2013, 08:23 PM
  2. question on populating date/day of week from source cell
    By sconniestyle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2013, 11:56 PM
  3. Replies: 3
    Last Post: 01-09-2010, 08:42 AM
  4. Replies: 3
    Last Post: 05-28-2008, 01:32 PM
  5. [SOLVED] Populating Last Saved Date in Cell AND also update that same cell in Header
    By o0o_Bigs_o0o in forum Excel General
    Replies: 2
    Last Post: 07-04-2006, 08:10 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