OK Dave, you asked...
Your first post was very vague. In my opinion not enough to go on.
I asked about perms but didn't get an answer until post #7.
You did not indicate whether this was to be an admin or logon script. we sort of deduced that by around post #16.
You kept changing the rules about ranges. Once they were non-contiguous the code had to change.
I think Rad explained the string vs. numeric thingy. I think he also explained it with the computer term GIGO. At a post count of 24 I thing there was both GI and GO.
I'm sorry if you think my bedside manners stink. BTW, you're not the first to say it. I'll try to remember to add dbeiser to my ignore list to save you from further exposure to it.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.