Question : Excel 2007 Macro Environ("UserName") Causing Error

I have an Excel spreadsheet with a macro in it that was running okay on Excel 2003/Windows XP.  Now, a user who has moved to Excel 2007/Windows 7 is getting an error based on Environ("UserName").  We have tried to set the security levels low for running the macro.  Any ideas what the issue is?

Answer : Excel 2007 Macro Environ("UserName") Causing Error

Thanks for the response.  When running my code myself, I found that the actual problem was that the code was not compiling, with an error stating "Can't find project or library" when referring to "Environ."  I found elsewhere online that putting "VBA" in front of "Environ" fixes this issue, so that is what I have done.

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_20419078.html
Random Solutions  
 
programming4us programming4us