View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default Multiple Application.UserNames

Hi Bob,

One way:

If Application.UserName < "User1" _
And Application.UserName < "User2" _
And Application.UserName < "User3" Then

---
Regards,
Norman


"Bob" wrote in message
...
I am trying to have an if statement with mulitiple user names.
The current code:
If Application.UserName < "User1" Then
executes properly, but it only works for one user

I want to do something like this:
If Application.UserName < ("User1" Or "User2" Or "User3") Then
This of course is incorrect and shows an error