Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
The following code will automatically insert username, date and time when data is put into 'B' somewhe Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Me.Range("B4:B50")) Is Nothing Then With Target If .Value < "" Then .Offset(0, 8).Value = (UserName) .Offset(0, 10).Value = Format(Now, "hh:mm:ss") .Offset(0, 9).Value = Format(Date, "dd/mmm") End If End With End If End Sub However, when data is removed from 'B', a debug window appears and the username etc isn't removed. If poss, i'd like two versions of this code, the first: if data is deleted from 'B' username etc is removed too, and if data is deleted from 'B' username etc remains and is not overwritten tia, -- Traa Dy Liooar Jock |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Tweaking Code | Excel Programming | |||
Tweaking Code | Excel Programming | |||
Need help - track changes code needs tweaking | Excel Programming | |||
Tweaking Code - Experts Only! | Excel Programming | |||
combining 2+ wkbks into 1. Code needs tweaking please | Excel Programming |