little alternation :
the variable that holds user level should be declared globaly like so
Public UserFlag as Byte