Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Environ("Username") with Windows7 64bit

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Environ("Username") with Windows7 64bit


I haven't usered windows 7 but you need to check the envirnomental
variables on you PC to see what they are set to. You are able to do
this in XP and Vista by running cmd.exe. Not sure if cmd.exe still
exists in windows 7 since microsoft eliminated lots of 16 and 32 bit
programs in windows 7. cmd.exe in a classic DOS shell that dates back
to the early 1980's. the first DOS PC had command.com which was the
window which would open up on these old machines. Then command.com was
replaced with cmd.exe. then the DOS shells were replaced with windows
3.0/3.1 (the windows versions less than 3 weren't widely used) and
Window 95.

IN XP it was simple to run cmd.exe you simply went to the menu Start -
run and typed cmd.exe. In vista microsoft made it more difficult and
you had to do a search by typing Start - Search and in the search box
type cmd.exe. Cmd.exe was really in the windows/system32 folder and
could simply go to the folder with a windows explorer and double click
on the ICON.


If you find cmd.exe then simply type in the DOS window "SET" at the
prompt and you will see all the environmental variables.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=179062

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default Environ("Username") with Windows7 64bit

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

"Jamen Lone" skrev i meddelelsen
...
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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default Environ("Username") with Windows7 64bit

works fine in any combination of the following for me:
windows 7 ultimate x64
windows 7 pro x64
excel 2003
excel 2007
excel 2010

--


Gary Keramidas
Excel 2003


"Jamen Lone" wrote in message
...
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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Environ("Username") with Windows7 64bit

Thanks .. problem is solved by changing the environmental variables :-)


Am 13.02.2010 10:15, schrieb 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




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Environ("Username") with Windows7 64bit



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]


On Sat, 13 Feb 2010 10:15:56 +0100, Jamen Lone
wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Environ("username") from 2003 to 2007 Chilidog Excel Programming 5 September 17th 09 05:47 PM
Environ("USERNAME") Heera Excel Programming 5 August 12th 09 01:54 PM
environ username vs. application username jatman Excel Programming 4 May 28th 09 08:40 AM
Save active sheet as "filename" on a remote server with username and password Teddy[_3_] Excel Programming 2 May 11th 07 04:48 PM
Environ("username") riso Excel Programming 11 March 9th 07 10:43 AM


All times are GMT +1. The time now is 09:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"