|
-
May 4th, 2001, 01:19 PM
#1
Help !!Searching through an array with conditions
Hi
I have a question on serching through an array and passing a value for certain conditions.
I am searching the User Rights array which has specific User rights for a user. Say a user has following rights.
1) Excel Admin
2) Excel Non-Admin
3) Word Admin
4) Word Non-Admin
5) PowerPoint Admin
6) PowerPoint Non-Admin
I am trying to write two seperate functions(1 for Excel and 1 for Word) so it passes 2 if the user has admin, 1 if user has Non-Admin, or 0 if user no rights to use that particular module. Then if user has say Word Admin rights then he automatically has Word user rights. So when I'm seraching the array I have to 1st see if he has admin and if not then non-admin and so forth.
But I'm not sure how I can do this ? I don't know when I should be assigning the exit value in a For or Do loop? Essentially I have to 1st search for Word admin rights in User Rights array then if it can't find Admin then look for Word Non-Admin and so on.
I know this is quite complex to explain but hope someone can help me
Thanks
Viji
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|