![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
|
Is there anyway to secure a XL Model so that It can only be used on a specific machine. e.g. using the network identifer?
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
for the Network setup for your computer via the Environ command.... Sub Tester() Dim sComp As String sComp = Environ("COMPUTERNAME") 'MsgBox sComp If sComp <> "The comptername you need" Then 'Do your thing End If End Sub |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
|
Doesn't seem to work, any other ideas?
|
|
|
|
|
|
#4 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
1) What OS are you using 2) Version of Excel 3) What coding did you use |
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: May 2002
Location: Ipswich, Suffolk, England
Posts: 135
|
I'm using windows 98
XL97 and I duplicated the code that shown, but inputing a msg box to display a result |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
in Win98.....I assumed you wanted this for a network situation NT....this is where it will work in...sorry Return a result. The Environ const strings avial are; ALLUSERSPROFILE APPDATA CommonProgramFiles COMPUTERNAME ComSpec HOMEDRIVE HOMEPATH HOMESHARE Include Lib LOGONSERVER LOGSERVER NUMBER_OF_PROCESSORS OS Os2LibPath Path PATHEXT PROCESSOR_ARCHITECTURE PROCESSOR_IDENTIFIER PROCESSOR_LEVEL PROCESSOR_REVISION ProgramFiles SMSHOME STARTUPLOG SYBASE SystemDrive SystemRoot TEMP TMP USERDOMAIN USERNAME USERPROFILE windir _MACH _TYPE Not sure if this is the complete list ? Check out VBA help for Environ function |
|
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
see if this similar thread by Tom from the old board helps out any
http://www.mrexcel.com/wwwboard/messages/15353.html
__________________
:: Pharma Z - Family drugstore :: |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|