MrExcel Publishing
Your One Stop for Excel Tips & Solutions

a hard one: asking the name to computer. Protecting macros

Posted by Pablo Manterola on March 14, 2001 5:40 AM


I want to include in my macro a "if" sentence that
ask the computer's name, and does different things
according to it.
Something like:

if"PC_Home" then
elsif"PC_Office" then

I thing there would be something like ""
or, at less, more elegant that read a text file
with a name (the second-best alternative).

Posted by Mark W. on March 14, 2001 7:07 AM

Pablo, you may be able to distinquish between your
home and office systems by the "User name" or the
pathname of the "Default file location" fields
that a found on the Tools Options... General tab.