Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help & Advise with code Please...
Hi all, i am trying using the code below to detect who is doing changes
and date and time. It is working, with the exception of the code after going to the sub HoodPSC. It runs one line of code then jumps back to the Worksheet_Change ???? Any help appreciated... Option Explicit Public UserName As String ================================================== ======= Public Function GetFullLoginName() As String Dim Domain As String Dim User As String With CreateObject("Wscript.Network") Domain = .UserDomain: User = .UserName End With GetFullLoginName = GetObject("WinNT://" & Domain & "/" & User & ",user").FullName End Function ================================================== ======= Private Sub Worksheet_Change(ByVal Target As Range) ' UserName = GetFullLoginName() If Not Application.Intersect(Target, Range("HoodPSC")) Is Nothing Then HoodPSC ElseIf Not Application.Intersect(Target, Range("BFPSC")) Is Nothing Then BFPSC ' ElseIf Not Application.Intersect(Target, Range("BRPSC")) Is Nothing Then BRPSC ' ElseIf Not Application.Intersect(Target, Range("FFMSPSC")) Is Nothing Then FFMSPSC '* End If End Sub ================================================== ======= Sub HoodPSC() ActiveCell.Offset(0, -8) = Now 'after this it jumps back up to "Sub_Worksheet Change" ???? Range("E6") = UserName End Sub Best regards, Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help & Advise with code Please... | Excel Programming | |||
I need some Advise | Excel Programming | |||
Changing this code ... Please advise | Excel Programming | |||
Advise VBA | Excel Programming | |||
VBA Advise | Excel Programming |