ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how do i get system id to a excel sheet (https://www.excelbanter.com/excel-programming/391447-how-do-i-get-system-id-excel-sheet.html)

pswanie

how do i get system id to a excel sheet
 
i got a workbook. i need the system id to display in a cell on a work sheet.
i am doing vb programing

joel

how do i get system id to a excel sheet
 
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\sys tem32\WBEM;C:\Program
Files\QuickTime\QTSystem\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.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


pswanie

how do i get system id to a excel sheet
 
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\sys tem32\WBEM;C:\Program
Files\QuickTime\QTSystem\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.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


Mark

how do i get system id to a excel sheet
 
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\sys tem32\WBEM;C:\Program
Files\QuickTime\QTSystem\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.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


pswanie

how do i get system id to a excel sheet
 
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\sys tem32\WBEM;C:\Program
Files\QuickTime\QTSystem\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.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


Peter[_21_]

how do i get system id to a excel sheet
 
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" schreef in bericht
...
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\sys tem32\WBEM;C:\Program
Files\QuickTime\QTSystem\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WS F;.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




All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com