I can use the environ function from the immidiate window, but it won't even compile in Excel VBA. Is there a prereq or something I have missed?
I can use the environ function from the immidiate window, but it won't even compile in Excel VBA. Is there a prereq or something I have missed?
Well, found it, for some reason one need to do it like this: VBA.Environ("UserName").
Not just Environ("UserName") which I think will work in many cases.