"now" date/time
"now" date/time
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: "now" date/time

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I am trying to use the "now" formula to insert different date/time in several columns.

    Problem I have is when it is entered, subsequent entries always change previously entered data. How do I prevent changes to previously entered "now" entries?

  2. #2
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The following code should work:

    With Application
    .Calculation = xlManual
    .CalculateBeforeSave = False
    End With

    Be careful with it, because it will stop all automatic calculations.
    _________________
    Hope this helps.
    Kind regards, Al.

    [ This Message was edited by: Al Chara on 2002-03-22 19:50 ]

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    I use the "Now" function in VBA to get my time stamps. Using this method prevents the date from changing. Here is a sample of the code i use:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Column = 1 Then
    Target.Offset(0, 1) = Now
    End If
    End Sub

    When a cell in column A is changed, this code puts the date and time into the cell next to that cell in column B. You can play with this code to get your desired effect. Just insert this code into your sheet's code. Also, instead of Now, you could use Date to just give the date.

    Hope that helps

    [ This Message was edited by: robfo0 on 2002-03-22 19:48 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com