i am such a tool

bpaquette

Registered User.
Local time
Today, 11:53
Joined
Aug 13, 2003
Messages
119
Ok, simple simple simple code with probably a simple simple error, but i can't catch it. as far as i know, a type mismatch is when you try to compare apples to oranges, which i don't think i'm doing here:

If Environ("username") = ("PaquetteBM" Or "DunnSW" Or "WatsonHL" Or "RussellYR" Or "UlyakJJ" Or "DunnSL" Or "ThompsonSL") Then

MsgBox ("Yes")

End If

if i limit the if then statement to only one condition (if environ("username")="PaquetteBM" then), it works, otherwise i get a type mismatch

is it apparent why?
 
bp,

If Environ("Username") = "PaquetteBM" Or Environ("Username") .......

Or

If Environ("Username") In ("afda", "fdsafa", "asdfa")

Or

Select Case Environ("Username")
Case "ads", "fdsafdsa", "fasdfsa"


Wayne
 

Users who are viewing this thread

Back
Top Bottom