Function "User()" to provide access to workbook

  • Thread starter Thread starter Wayne
  • Start date Start date
W

Wayne

Using WindowsXP_OS and Office 97 (Excel 97)...

I've created a function in a module and set cell A1
to "=User()"
This provides the user name within this cell.

I want to be able to lookup the user name within this
cell and providing the user is authorised to use the
workbook then they can proceed, otherwise I want excel to
close the workbook.

Eg. Jim Smith OK to use
Fred Bloggs OK to use
Any other user exit excel

Any Help would be a great help!!!!!
 
I have only used this on Windows NT logged onto a LAN to get the users
ID ,so I do not know if it will work in your situation

UserName = Environ$("UserName")
 
Back
Top