Results 1 to 3 of 3
  1. #1
    Join Date
    May 2008
    Posts
    48

    Unanswered: Store current date & later on user in cell

    How can I store current date & use it in cell ?

    Actually, I wish whenever any user run macro, it store the current date & later on use the stored date in cell. I know this is possible through VBA. I have tried to do that but it gives an error.

    Please help.

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    Hi,
    I know this is possible through VBA. I have tried to do that but it gives an error.
    It is possible through VBA.

    If you post the part of the code where you tried to do it together with the error description, then we should be able to tell you why it's going wrong.

    Hope that helps...

  3. #3
    Join Date
    May 2009
    Location
    India
    Posts
    66
    Actually, in one cell, you should use vba/macro to "paste special" the value of the first cell (where the date was first got as the current date).

    Code:
    '
        Range("A1").Select
        Selection.Copy
        Range("A3").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("A1").Select
        Application.CutCopyMode = False
        Selection.Copy
        Range("A3").Select
        Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
            SkipBlanks:=False, Transpose:=False
    In the example, cell A1 contains the "now" value with format "dd/mm/yyyy hh:mm:ss" and cell A3 the stored value for later use.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •