Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50254

Automated username VBA not working

$
0
0
HI,

I have the following VBA code to add a username to a certain cell in column AL if there is any changes has been done in column AA

Code:



Private Sub Worksheet_Change(ByVal Target As Range)

Dim rngCell As Range

If Not Intersect(Target, Range("AA:AA")) Is Nothing Then
  Application.EnableEvents = False
  For Each rngCell In Target
    Target.Offset(0, 11).Value = Environ$("USERNAME")
  Next rngCell
  Application.EnableEvents = True
End If

End Sub

it was working, but now it seems it is not working, Please help

Viewing all articles
Browse latest Browse all 50254

Trending Articles