Environ("Username") with Windows7 64bit

  • Thread starter Thread starter Jamen Lone
  • Start date Start date
J

Jamen Lone

Hi all,

I'm using XL2003 vba with WIN7 professional and my old vba code won't work.

i create in XP some code lines to read out the user which is log on.
now i want to do the same with win7 prof 64bit
can someone give me hints ??

thanks in advance
 
Hi

I am using WIN7 Home Premium 64 bit and XL2007.

In the Immediate window I entered the statement:

debug.Print environ("Username")

and it prompted my username as expected, so I guess you have to look
somewhere else to solve the problem.

Post your code for further comments, along with an error description and
state the line which is highlighted when you click debug.

Regards,
Per
 
works fine in any combination of the following for me:
windows 7 ultimate x64
windows 7 pro x64
excel 2003
excel 2007
excel 2010
 
Thanks .. problem is solved by changing the environmental variables :-)


Am 13.02.2010 10:15, schrieb Jamen Lone:
 
Debug.Print Environ("username")

works fine for me on Windows 7 Ultimate 64-bit, in both XL2003 and
XL2007.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]
 
Back
Top