LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default 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 ***
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
advise pls Hopeless With excel Excel Programming 1 January 22nd 06 04:49 PM
pls advise George Excel Worksheet Functions 2 February 25th 05 08:22 PM
I need some Advise Tom Ogilvy Excel Programming 0 October 16th 04 12:50 AM
Changing this code ... Please advise Jako[_39_] Excel Programming 13 July 25th 04 10:01 PM
VBA Advise RB[_3_] Excel Programming 1 July 15th 03 03:26 AM


All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"