+ Reply to Thread
Results 1 to 9 of 9

Automatically entered time and date

  1. #1
    Forum Contributor
    Join Date
    11-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    106

    Automatically entered time and date

    Hi,

    I need my excel file to automatically enter date and time at 2 specific cell (separately).
    Eg : Date at cell "AF5" & time at cell "AF6"

    Currently I'm using following code for manually entering time :
    ActiveCell.Value = Time()

    Thanks in advance :-)

  2. #2
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Automatically entered time and date

    Hi,
    where is Your bit of code located?

    It could be done automatically when the code is located on 'worksheet open' event like:
    Please Login or Register  to view this content.
    or anything You want.

    M

  3. #3
    Forum Contributor
    Join Date
    11-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Automatically entered time and date

    Hi Miroslav R.
    I'm still new to this VBA stuff...

    What is the meaning bit of code?
    Actually the code i'm using is assigned to a command button...

    TQ for your reply, i'll try it

  4. #4
    Forum Contributor
    Join Date
    11-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Automatically entered time and date

    OK, question again..
    How to enter the code?

  5. #5
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Automatically entered time and date

    Hi
    Go to the VBA editor.in the explorer bar doubleclick 'thisworkbook'.on the window that appears,there are to dropdowns on the top.from the left one select 'workbook' and ten select 'selectionchange' from the right one.type the code You have in between sub - end sub prescription. That is all You have to do.
    Retardácie
    M

    Odoslané z C6603 pomocou Tapatalku
    Regards
    Miroslav R.

    (If You like my solutions, feel free to add reputation.)

  6. #6
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Automatically entered time and date

    Sorry for the spelling but I am on the phone today. ;-)

    Odoslané z C6603 pomocou Tapatalku

  7. #7
    Forum Contributor
    Join Date
    11-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Automatically entered time and date

    Dear Miroslav,

    Sorry, I can' t get the VBA to work, I've change the worksheet name to sheets(1) and
    also nothing happen ... what when wrong ?

  8. #8
    Valued Forum Contributor Miroslav R.'s Avatar
    Join Date
    05-16-2013
    Location
    NMnV, Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    479

    Re: Automatically entered time and date

    Wbk_Open_Event.xlsm

    Hi,

    go to VBA editor (ALT+F11) and in explorer window doubleclick 'ThisWorkbook'. There You will find what were I talking about...

    Regards

    M

  9. #9
    Forum Contributor
    Join Date
    11-29-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Automatically entered time and date

    tq Miroslav,
    ur example very clear to me
    Thank you for your help


    Sent from my iPhone using Tapatalk

+ 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. Replies: 1
    Last Post: 04-23-2013, 08:27 PM
  2. Automatically place date and time in one cell when another cell has any data entered.
    By sameredith in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-20-2012, 07:49 PM
  3. How to have a date entered automatically
    By malt_man in forum Excel General
    Replies: 3
    Last Post: 12-08-2010, 05:24 AM
  4. Present time entered automatically with data?
    By contextions in forum Excel General
    Replies: 10
    Last Post: 09-25-2008, 09:32 PM

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