+ Reply to Thread
Results 1 to 12 of 12

update date and time from userform

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    update date and time from userform

    hi
    have been trying to add time to the date from a userform,have formatted sheet cell date to date and time but only date shows, with time set as 00.00 any ideas please
    cheers colin
    Last edited by cfinch100; 06-23-2013 at 07:58 AM.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: update date and time from userform

    Try this,

    Format the cell using this. Change the range to suit.

    Range("A1").NumberFormatLocal = "[$-409]yyyy/m/d h:mm AM/PM;@"
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    02-18-2013
    Location
    KSA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: update date and time from userform

    Hi,
    I am using Office 2013 with Windows 8 Pro right now...
    I using the same formula from Excel 2010 Windows 7 it is working but in my current Office 2013 Windows 8 unfortunately the formula is not working in some cells. I am wondering why, can you help me to fix this?

    Kindly see below the sample:
    12/06/2013 20:38 12/06/2013 21:25 NASAIR 0:47:00
    12/06/2013 18:09 12/06/2013 19:22 SAUDI ARABIAN AIRLINES 1:13:00
    12/06/2013 21:27 13/06/2013 00:30 SAUDI ARABIAN AIRLINES #VALUE!
    12/06/2013 23:14 13/06/2013 00:36 SINGAPORE AIRLINES #VALUE!

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: update date and time from userform

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: update date and time from userform

    hi japandave
    tried that and could not get to work prob me got it wrong have added program its last monthly I want date and time for
    cheers colin
    Attached Files Attached Files
    Last edited by cfinch100; 06-22-2013 at 08:06 AM.

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: update date and time from userform

    Where is the date on the sheet?

  7. #7
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: update date and time from userform

    hi
    I enter the date in monthly inspected which goes to cell " m" on sheet
    cheers colin

  8. #8
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: update date and time from userform

    See if this does what you want?
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: update date and time from userform

    hi japandave
    afraid it has changed time to 1200am from 0000 and nothing else,will not put real time in
    cheers colin

  10. #10
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: update date and time from userform

    It defaults to 12:00. What time were you expecting? I am guessing that you want one of the text boxes with a time in it to go in there?

  11. #11
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: update date and time from userform

    hi japandave
    yes I wanted to update the time to when it was saved so had date + time to say when they were serviced,
    cheers colin

  12. #12
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    772

    Re: update date and time from userform

    hi
    have sorted now many thanks dave you put me on the right track
    cheers colin
    Attached Files Attached Files

+ 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