View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Matt Matt is offline
external usenet poster
 
Posts: 516
Default Target.Offset(0, 36).Value Help

In the below, I use this to force the persons USERNAME to populate 36 rows to
the right in a column I hide. This shows me who was in a spreadsheet and
updating ONE specific column... Column AD. My question is this... Can I
poulate a named range with their USERNAME. I want to insert a named range,
then force the USERNAME there. (INSERTNAMEDEFINE)



Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Const myRange As String = "ad7:AD90"
'Const myrange As String = "A3,A6,A8,A11,A16"
On Error GoTo stoppit
Application.EnableEvents = False
If Intersect(Target, Me.Range(myRange)).Value < "" Then
Target.Offset(0, 36).Value = Environ("USERNAME")
Else
If Intersect(Target, Me.Range(myRange)).Value = "" Then
Target.Offset(0, 36).Value = ""
End If
End If
stoppit:
Application.EnableEvents = True
End Sub