Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #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 ***
Reply
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
Help & Advise with code Please... Les Stout[_2_] Excel Programming 2 February 25th 08 05:51 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
Advise VBA No Name Excel Programming 7 December 3rd 03 07:14 PM
VBA Advise RB[_3_] Excel Programming 1 July 15th 03 03:26 AM


All times are GMT +1. The time now is 04:28 PM.

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

About Us

"It's about Microsoft Excel"