Since allowing access is conditional, Ben`s call line could be modified
as follows to obviate need for a function...
In a standard module where globals are stored:
Public Const gsAllowedUsers$ = "ajones,jsmith" '//edit to suit
SomeSub()
If InStr(gsAlloweUsers, Environ("username")) 0 Then _
`do stuff
End Sub 'SomeSub
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion