I have an Excel sheet that refreshes data and need to only limit data presented to the user loged on the computer. The background application is called Noetix and I've linked the report ID into the code. The Noetix program asks for a user ID... instead of programming 165 users individually, I am trying to add code that will pick up the user name from the VPN ID.
Sheets("Sheet1").Range("A1").Value = Environ("UserName")
MsgBox "PC User Name is: " & CurrentUserName, vbOKOnly + vbInformation, "PC User Name"
MsgBox "PC Name is: " & PCName, vbOKOnly + vbInformation, "PC Name"