I have a worksheet named "MINE" and need that when I open it my username appears in cell A1. I need that my username will be full name, example Tony Smith.
Thanks in advance
Sub AppearUsrName()
Dim ws as worksheet
Set ws = worksheets("MINE")
If ActiveSheet.Name=ws.Name then
ws.range("A1")=Application.UserName
End if
Set ws = nothing
End sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim ws as worksheet
Set ws = worksheets("MINE")
If ActiveSheet.Name=ws.Name then
ws.range("A1")=Application.UserName
End if
Set ws = nothing
End Sub
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim ws as worksheet
Set ws = worksheets("MINE")
If Sh.Name=ws.Name then
ws.range("A1")=Application.UserName
End if
Set ws = nothing
End Sub