PDA

View Full Version : Solved: quick question



Djblois
01-09-2007, 12:57 PM
Does anybody know where excel gets this info from:

Application.UserName


because I use that in the page setup and I get an Administrator, while everyone else gets there name. And I am not an Administrator.

CBrine
01-09-2007, 01:54 PM
Djblois,
Ran a quick test and found that this is not the case.

Djblois
01-09-2007, 01:57 PM
Thank you but where does Excel get the author field from?

CBrine
01-09-2007, 01:59 PM
OK,
Got it now.

1. Select tools.....Options.
2. Click on the general tab.
The User Name field is what the code returns.

Tested this time.

HTH
Cal

Bob Phillips
01-09-2007, 01:59 PM
It gets it from the value when you load Excel. If Excel is made available to everyone it is the name that the account is setup under, BUT ... it can easily be changed, it is stored in Tools>Options>General, in the Username box.

CBrine
01-09-2007, 02:00 PM
Djblois,
The options....User Name field is a global variable that I think feeds the author field.

Cal

mdmackillop
01-09-2007, 02:01 PM
Tools/Options/General - Username
changes it for me.

Bob Phillips
01-09-2007, 02:34 PM
Djblois,
The options....User Name field is a global variable that I think feeds the author field.

Cal

I don't think so. Once setup when Excel is installed, it becomes an application property, and is only changed through the application.

CBrine
01-09-2007, 02:42 PM
Is it included in the install? It's been so long, but I don't believe that you are prompted for that. I know the first time that an office app is run on a user profile, you are prompted for initials and user name. I think it's setup at that point, not at the install? Correct me if I wrong though(Which I know you will xld), cause I'm not positive.
Although my terminology is wrong, you are right that it is a property, but isn't a property just a class variable.

Cal