User Name

  • Thread starter Thread starter JVS
  • Start date Start date
J

JVS

Is there a formula to capture the current user's name (%username%) in a
cell?
I do not want to use any code that will ask the users to enable macro when
they open the document.

Thanks!
xjvs
 
Use a UDF

Function UserName()
UserName = Environ("UserName")
End Function

and use ina cell like this

=UserName()

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
Use a UDF

That will still raise the Macros Security message, which the user indicated
he doesn't want. I don't think there is any way to get the user name without
using some VBA.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
there is

use SUSER_SNAME() in a database call
only a ****ing retard would use Excel for anything; basic operations
like this shouldn't require a PHD

-Aaron
 
(e-mail address removed) wrote...
there is

use SUSER_SNAME() in a database call
only a ****ing retard would use Excel for anything; basic operations
like this shouldn't require a PHD
....

The simple query

SELECT SUSER_SNAME();

when run in Access 2003 throws a runtime error with error message

Undefined function 'SUSER_SNAME' in expression

Now, since Access queries can be this simple, e.g., the query

SELECT NOW();

correctly returns a table with one record of one field with that field
containing the system date, it would appear that SUSER_SNAME isn't an
Access built-in function.

Care to mention all the various packages the OP would need to install
and how to configure them in order for this particular function to be
available in simple Access queries? That is, if you have any clue how
to do so.
 
dude screw your MDB crap

SQL Server is bigger, better, cheaper, easier administration, easier
development and more reliable

maybe if your company wasn't stuck in the 80s' with a handful of
'super-duper complex legacy systems' then maybe they would have heard
of SQL Server ROFL

I never mentioned anywhere that I'm a ****ing retard that uses MDB
format.
Did I?
 
I dont need to install a single package or find an API call

I dont' need to do jack shit except pull from a SQL database 'Select
Suser_sname()' then it should work like a charm

if worst came to worst; I would just use 'Select Suser_Sname() as
SUser_Sname'

either way: i wouldn't prompt the end user with VBA Macro Warnings; I
wouldn't make them enter it by hand.

Virus.MSExcel = 1660 results
Virus.MSAccess = 153/154 results (depending on whether you search with
doublequotes)

so.. it looks like Excel Viruses are pretty much a huge old pain in the
butt.. looks to me like they are 10 times as popular in Excel then they
are in Access.

so you might say that 'Excel is more popular than Access-- which I
_SURE_ dont agree with.. but lets' look further:

3,060,000 for "Microsoft Access"
16,500,000 for "Microsoft Excel"


So Excel has 5.5 times as many posts than Access does.. but the
estimated level of Virus Activity is 10 times higher?

Looks to me like Excel is a HUGE VIRUS THREAT

I WOULDNT ALLOW VBA MACROS EITHER!!
 
(e-mail address removed) wrote...
....
SQL Server is bigger, better, cheaper, easier administration, easier
development and more reliable
....

Apparently the OP would need to use SQL Server.
I never mentioned anywhere that I'm a ****ing retard that uses MDB
format.
Did I?

No, you never mentioned anything about whatever DBMS system you were
assuming that would provide the SUSER_SNAME function you proposed.
Without such context, your response was as useful as saying the best
word would be 'the'.

So you're saying you're a retard who doesn't use MDB?
 
(e-mail address removed) wrote...
I dont need to install a single package or find an API call

I dont' need to do jack shit except pull from a SQL database 'Select
Suser_sname()' then it should work like a charm

if worst came to worst; I would just use 'Select Suser_Sname() as
SUser_Sname'
....

Fine for you since you have SQL Server installed. Unlikely the OP does.
And if the OP doesn't, your original response has all the information
content of your usual responses.
either way: i wouldn't prompt the end user with VBA Macro Warnings; I
wouldn't make them enter it by hand.
....

Where did I mention VBA Macro anything? Your query generates a runtime
error in Access itself.
So Excel has 5.5 times as many posts than Access does.. but the
estimated level of Virus Activity is 10 times higher?

Only if none of those posts were redundant. You need to condense
multiple reports of the same virus into single instances. Good luck.
 
Harlan

sorry I assumed; ever since SQL Server won the database wars --- by
SEAT -- I haven't felt the need to specify

No, im not a retard
and
No, I dont use MDB.. I would rather use XLS than MDB and that says A
LOT

-Aaron
 
uh www.google.com ?

do you read the news, jackass?


www.tpc.org ?
http://www.tpc.org/tpch/results/tpch_price_perf_results.asp
I honestly don't see Oracle listed in the top 15 entries LoL

same with tpcw
http://www.tpc.org/tpcw/results/tpcw_perf_results.asp

same with tpcc
http://www.tpc.org/tpcc/results/tpcc_price_perf_results.asp

anything else came from the 90s.. yeah.. Oracle was ahead of MS 10
years ago; i'm willing to concede that.

and for the record.. anything over 100gb; Microsoft can win with their
HANDS DOWN by using Olap. I mean seriously here...

http://www.olapreport.com/market.htm - they beat oracle BY A WIDE
MARGIN in the Olap market
28% is CONSIDERABLY MORE THAN 4%
http://www.fmsinc.com/tpapers/genaccess/DBOD.asp

and let's move downstream to MS Access world:

As the most popular database product in the world, Access clearly
dominates one of the most important segments of the database ecosystem.


and now..official gartner figures-- of revenue--

http://www.gartner.com/press_releases/asset_152619_11.html

Oracle 6,721.1
IBM 3,040.7
Microsoft 2,073.2

and then from this article; it talks about how Oracle can cost up to
500% as much as SQL Server-- solely because of their multi-core
pricing.

http://download.microsoft.com/download/e/2/3/e2341d27-107f-4613-ad97-eb277b48241e/UndrstDBPrcng.doc

The following graph shows the impact of multicore pricing on enterprise
database editions. SQL Server 2005 Enterprise Edition, when installed
on a four-processor server, will require four processor licenses for a
total cost of about $100,000. With dual-core processors, the software
will run on eight cores, but only four processor licenses will be
required so the total cost remains the same. On the other hand, Oracle
and IBM charge per core, so in the same scenario the license cost would
increase by 50 percent and 100 percent respectively. With quad-core
systems, the license cost from both vendors would double, so that IBM
and Oracle database licenses could easily wind up costing 500 percent
of what the equivalent licenses from Microsoft would cost.
 
**** buddy

I'm fine with a 28% marketshare to Oracles 4%...

that's good enough for me.

anything else is frosting on the cake

I don't support MDB format; but it's hilarious in my book-- that MDB
might just be the worlds most popular format; if it isn't then JET
(Windows, Outlook, Exchange, Project, Excel) is the worlds most popular
format.

Which puts Oracle at a distinct THIRD PLACE behind Microsoft SQL and
Microsoft Access.. lol

it's just funny; you think that Excel is oooohhhh, sooo powerful.
and a supercomputer with Excel is going to solve all the worlds
problems.

I call hogwash on your ass.

the typical company needs ZERO spreadsheet dorks and about a DOZEN ETL
developers

is it my fault that the numbers are reversed in most companies??

hand written reports-- like what you do in Excel are laughably
inefficient

what if you need to change a formula.. you need to do it what in about
a billion different places?

Databases and real programming languages-- they REEK of code-reuse.

Excel doesn't even support it.

The only thing that Excel has going for it is VBA; which is 10 years
out of date and not supported by Microsoft in ANY WAY, SHAPE OR FORM.

And of course, Excel Macros Viruses are about the most prevalent type
of Virus ANYWHERE.

Is it because they're more popular??

NO.

It is because they have a crappy ass architecture; they're not a
software development platform-- even though you Excel dorks try to use
it as a software development platform.

it just makes me sick to think that your companies actually PAY YOU TO
TYPE SHIT INTO A SPREADSHEET.

OR SHOULD I SAY COPY AND PASTE.

Yes; you might successfully build a dull dagger; on the battlefield of
numerics.. yeah it is a DAGGER.. but it took you a WEEK TO BUILD!!

On the other hand, I am a wizard of metrics; a warlock who spawns
dozens of armor clad M1A1 tanks. My databases and _REAL_APPLICATIONS_
spawn more numbers, more calculations before 3am than yours does in a
week.

Excel can't even be scheduled.. you cant' even preprocess shit to run
at night; you just need a grip of ugly ugly Excel Macros and you 'hope
that your 100 pages of spaghetti code works out allright'

I've had enough.
It's war ****ers.
Just because 'oh excel doesnt have a limit until 1m rows' and 'oh excel
hooks to a supercomputer' it doesn't make Excel a magical ARCHITECTURE.

There wont ever be an Excel ARCHITECT certification program.

It just isn't worth the time or effort; since all spreadsheet dorks are
the mutts of the earth and don't know how nasty it is.. when they sit
there and lick their own ASS.

Excel is that repulsive to me.

One rusty dagger vs someone who can spawn dozens of tanks..

ROFL

you guys are the biggest wimps of all time.
you fight for the pink team; you're not honorable; you're not doing
your family or your companies JUSTICE by using such a piece of shit ass
architecture.

Excel is a DISEASE and I wish you all plagues and locusts

-Aaron

-Aaron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top