Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "N:N"
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.offest(0, 1).Value = sName
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub
'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.

Signature
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
> I have a spreadsheet which I share with four other people, and I need to
> have their login username (the variable is called sName) as part of their
[quoted text clipped - 20 lines]
> Regards
> McBarker
McBarker - 23 Feb 2006 12:00 GMT
>> I have a spreadsheet which I share with four other people, and I
>> need to have their login username (the variable is called sName) as
[quoted text clipped - 23 lines]
>> Regards
>> McBarker
> Private Sub Worksheet_Change(ByVal Target As Range)
> Const WS_RANGE As String = "N:N"
[quoted text clipped - 15 lines]
> 'code module. To do this, right-click on the sheet tab, select
> 'the View Code option from the menu, and paste the code in.
Bob, your code didn't work. It seemed to not do anything. I managed to come
up with the following working solution (in case anyone else has a similar
problem). If anyone sees a potential problem with the following code, please
let me know. Thanks
Regards
McBarker
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim TimeStr As String
Dim sName As String
Dim TimeEntered As Boolean
Application.EnableEvents = False
For Each cell In Range("N7:N31")
.NumberFormat = "hh:mm"
TimeEntered = False
.Value = TimeValue(TimeStr)
TimeEntered = True
Do While TimeEntered = True
.Offset(0, 1) = sName
TimeEntered = False
Loop
Next
Application.EnableEvents = True
Exit Sub