Hello,
i think, and correct me if i'm wrong, nut it comes from the PC not excelas such, we use xp and on a network and my login name is the same as =environ(username).
Dim myOlApp, myNameSpace As Object
Dim Full_name, First_Name, Surname, User As String
Set myOlApp = CreateObject("Outlook.Application")
Set myNameSpace = myOlApp.GetNameSpace("MAPI")
Full_name = myNameSpace.CurrentUser.Name
First_Name = Right(Full_name, Len(Full_name) - WorksheetFunction.Search(",", Full_name) - 1)
Surname = Left(Full_name, WorksheetFunction.Search(",", Full_name) - 1)
User = First_Name & " " & Surname
Start Windows Explorer, click the + next to the C: drive, click the + next to Documents and SettingsI have entered this into mywrkbook and it still does not give me my username...
Any ideas why?
Invalid Ouside procedure
Set myOlApp = CreateObject("Outlook.Application")
Hi
I tried your code and it comes up with an error message saying:
Quote:
Invalid Ouside procedure