View Single Post
  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

Chris,

Here is an alternative. I can't test it as I don't have Win98 or 95, but it
shoudl work. It does mean that on the 98 machines, you need to ensure that
the Excel user is defined (ToolsOptions and on the general tab, set5 the
User Name box).

Private Sub Worksheet_change(ByVal Target As Range)
Dim sOS As String
Dim sSystem As String

If Not Intersect(Target, Range("I7")) Is Nothing Then
sOS = Application.OperatingSystem
Select Case True
Case InStr(1, sOS, "NT 5.01") 0: sSystem = "XP"
Case InStr(1, sOS, "NT 5.00") 0: sSystem = "2000"
Case InStr(1, sOS, "NT 4.00") 0: sSystem = "NT4"
Case InStr(1, sOS, "4.10") 0: sSystem = "Win98"
Case InStr(1, sOS, "4.00") 0: sSystem = "Win95"
End Select

Range("J7") = Now
If sSystem = "Win98" Or ssyetm = "Win95" Then
Range("L7").Value = applicationusername
Else
Range("L7").Value = Environ("username")
End If
End If

End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"chris w" wrote in message
...
Bob, your help has been spot on, thank you,

but I believe I may be getting in over my head. The last string change to

=
environ("username"), works perfectly, except I realize now my user name on

my
XP machine shows "Owner" on the win 98 machines shows nothing. Changing

the
"Owner" designation looks to get messy.

"Bob Phillips" wrote:


"chris w" wrote in message
...
link dosent work.


Try this


http://msdn.microsoft.com/library/de...texcel2000.asp

but I have run into a glitch with this function, kinda,

What this tool is doing is I have a button that runs a macro to update

links
to the sheet and makes a change to the cell "I7" so "J7" shows when

the
update macro was run and I want "L7" to show who ran the update.

Using
author, it puts my name in regardless of who (which computer) has the

sheet
open. I have another cell that shows who the last author is, but last

author
dosent work unless the person saves the sheet before running the

update.

I suppose I can have as part of the macro to save sheet?


No need. I should have thought of that when I was writing it. Updated
version

Private Sub Worksheet_change(ByVal Target As Range)

If Not Intersect(Target, Range("I7")) Is Nothing Then
Range("J7") = Now
Range("L7").Value = Environ("username")
End If

End Sub


Bob