Quote Originally Posted by mdmackillop
[vba]Sub Test()
Dim IsSASServer As Boolean
IsSASServer = InStr(1, Environ("Computername"), "SAS", vbTextCompare) > 0
MsgBox IsSASServer
End Sub
[/vba]
It would be worth a function if you pass the data ("SAS") to be checked.
md, thanks for your help.

This is similar to the Function I was trying to create in post #4. Is this what you meant. Do you agree with the error handling used - is any of it redundant or unnecessary?