![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 1
|
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 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
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 |
|
Board Regular
Join Date: Feb 2002
Location: Stockton, California
Posts: 281
|
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 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|