Hi,
I am trying to get a formula that will generate whoever is inputting the reports username in a cell. After some research online, I've come across a VBA UDF but I'm not sure if I am doing it right.
I've tried creating a new module and adding the following:
And then in the cell
=Username()
However, it will only generate my username, no matter who is doing the report. Have I missed something or is there something I can do to get this working?
Thank you for any help offered
Thanks,
Michaela
I am trying to get a formula that will generate whoever is inputting the reports username in a cell. After some research online, I've come across a VBA UDF but I'm not sure if I am doing it right.
I've tried creating a new module and adding the following:
VBA Code:
Function Username()
Username = Environ$("USERNAME")
End Function
And then in the cell
=Username()
However, it will only generate my username, no matter who is doing the report. Have I missed something or is there something I can do to get this working?
Thank you for any help offered
Thanks,
Michaela