It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

Last Date Row was modified code for Excel??

Moderator: dafunkymunky

Last Date Row was modified code for Excel??

Postby rob-core on Wed Apr 30, 2008 7:56 pm

Hello reader,

I am trying to code an Excel spreadsheet to place a date stamp in column A at any point that particular row is modified - not just the spreadsheet, but every cell in the individual row. I track laptops in the company I work in and to make sure we have accurate data, I need time/date stamps on every row in case that the spreadsheet does not show correct information. Here is the VB code that I have so far:

Option Explicit
---------------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Application.EnableEvents = False
Target.Offset.Offset(0, 1) = Now()
Application.EnableEvents = True
End If
End Sub

I am able to get the column to stamp the date and time, but only for 1 column.

Can anyone help me? I am close, I just need a little nudge.

Thanks in advance.

-Rob
rob-core
 
Posts: 0
Joined: Wed Apr 30, 2008 7:33 pm
Location: Austin

Who is online

Users browsing this forum: No registered users and 3 guests