Copy the function to a general module in your workbook.
Then in any cell in any sheet of that workbook enter =UserNameWindows()
just as you would any other function.
Takes no arguments.
Gord Dibben MS Excel MVP
On Fri, 6 Mar 2009 08:44:01 -0800, Dave
VB logic for excel
wrote:
Hello,
Thanks alot but its doesnt work. Im using exel 2003. how to solve it? and
also.. do i just copied and paste in vb editor? wat about the cell that i
want the information to visible?
"Sheeloo" wrote:
Function UserNameWindows() As String
UserName = Environ("USERNAME")
End Function
Thanks to Charles Maxson. See
http://blogs.officezealot.com/charle...2/10/3574.aspx
You can put it in any cell...
"Dave VB logic for excel" wrote:
Hello,
im currently working in excel sheet. i wanto add function where it can
capture the username whenever any users open the sheet. It can capture from
system or licencing. I would like to know the function or vb formula.
Please help
Thanks in advanced