Have you tried J-Walk's function for username and comptername ?
If not, here it is:
http://j-walk.com/ss/excel/tips/tip94.htm
They use API calls. I encorporate them into just about any stand-alone
application.
"pswanie" <(E-Mail Removed)> schreef in bericht
news:C3B29E41-A62A-4272-A493-(E-Mail Removed)...
> do appreciate!! that worked...
> thanx mark
>
> "mark" wrote:
>
>> Put the following in a module:
>> Function UserName() As String
>> UserName = Environ("UserName")
>> End Function
>>
>> then in B2:
>> =UserMame()
>>
>> Mark
>>
>> "pswanie" wrote:
>>
>> > what would the text that i enter in the cell need to look like?
>> >
>> > my user account name on the one computer are 'pswanie' and the other
>> > computer are 'janphi'.
>> >
>> > if i open and print the sheet on 'pswanie' i want the cell b2 to say
>> > 'pswanie' and if i open and print the sheet (wich is saved on separat
>> > on each
>> > machin) on 'janphi' i want b2 to say 'janphi'
>> >
>> >
>> > "Joel" wrote:
>> >
>> > > Not sure what perameter you are looking for. Below ae some of the
>> > > system
>> > > parameters for Windows XP. Are you looking for the username ?
>> > >
>> > > ALLUSERSPROFILE=C:\Documents and Settings\All Users
>> > > APPDATA=C:\Documents and Settings\Joel\Application Data
>> > > CLASSPATH=.;C:\Program Files\QuickTime\QTSystem\QTJava.zip
>> > > CLIENTNAME=Console
>> > > CommonProgramFiles=C:\Program Files\Common Files
>> > > COMPUTERNAME=JOELSCOMPOUTER
>> > > ComSpec=C:\WINDOWS\system32\cmd.exe
>> > > FP_NO_HOST_CHECK=NO
>> > > HOMEDRIVE=C:
>> > > HOMEPATH=\Documents and Settings\Joel
>> > > LOGONSERVER=\\JOELSCOMPOUTER
>> > > NUMBER_OF_PROCESSORS=1
>> > > OS=Windows_NT
>> > > Path=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Program
>> > > Files\QuickTime\QTSystem\
>> > > PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
>> > > PROCESSOR_ARCHITECTURE=x86
>> > > PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
>> > > PROCESSOR_LEVEL=15
>> > > PROCESSOR_REVISION=0209
>> > > ProgramFiles=C:\Program Files
>> > > PROMPT=$P$G
>> > > QTJAVA=C:\Program Files\QuickTime\QTSystem\QTJava.zip
>> > > SESSIONNAME=Console
>> > > SystemDrive=C:
>> > > SystemRoot=C:\WINDOWS
>> > > TEMP=C:\DOCUME~1\Joel\LOCALS~1\Temp
>> > > TMP=C:\DOCUME~1\Joel\LOCALS~1\Temp
>> > > USERDOMAIN=JOELSCOMPOUTER
>> > > USERNAME=Joel
>> > > USERPROFILE=C:\Documents and Settings\Joel
>> > > windir=C:\WINDOWS
>> > >
>> > >
>> > > "pswanie" wrote:
>> > >
>> > > > i got a workbook. i need the system id to display in a cell on a
>> > > > work sheet.
>> > > > i am doing vb programing