I'd be glad to elaborate. I have several network shared folders (over 500) IN ALL CASES, SUB-FOLDERS INHERIT ATTRIBUTES FROM THE TOP-LEVEL FOLDER
Each folder is "owned" by someone (over 150 separate "owners") Every 6 months, each "owner" is presented with a list of users that have access to their folder(s) and the level of access (read/write, read-only, etc) The total number of unique user/folder combinations exceed 80,000 records. Each owner is asked twice/year to review his/her user lists (Access Control List) and Certify that the users are still employed and have the appropriate authorizations. Now, as a Data Owner, I know the Windows Groups that have access to "my" folders. I use something similar to: strPath = "WinNT://" & strDomain & "/" Set grp = GetObject(strPath & strGroup & ",group") For Each gname In grp.Members (strGroup is passed to the function) this gives me the userid's and names of the members of the group. So... here's what I want to do: 1) Read folder names from sheet "Network Shares" 2) Obtain Windows Group names for specific folder 3) Obtain User Names for each Windows Group 4) Create sheet for each Shared Folder (NOT SUB-FOLDER) What I "envisioned" is a Sub that reads the folder names, Pass the folder name to a Function that determines the Windows Groups for that folder. Pass the Windows Group to a Function that determines the group members. Create the sheet. I can do the first item and last two. the one I'm having trouble with is #2.. Obtain Windows Group names for a specified folder. (There is a possibility that there is a user that is EXPLICITLY assigned to a folder rather than to a Group, I would need to report that also) Does that help? I appreciate your assistance... paul ________________________________ From: Ajit Navre <ajit.na...@gmail.com> To: excel-macros@googlegroups.com Sent: Wednesday, April 29, 2009 2:55:37 AM Subject: $$Excel-Macros$$ Re: Use VBA to determine Windows Groups permissions for a folder Hi, Take a look at the following links... http://www.15seconds.com/issue/020130.htm http://www.computerperformance.co.uk/vbscript/wmi.htm I am still not very clear about what exactly your are trying to do. That is may be because I personally haven't done this before. Still I would like to assist you if you elaborate further. Need to take a look at the code. That way, can suggest you ways to build a directory-tree like tree. I need to know how your are retrieving the group names and then how you are enumerating the names of users in that group. Regards Ajit -----Original Message----- From: excel-macros@googlegroups.com [mailto:excel-mac...@googlegroups.com] On Behalf Of Paul Sent: Tuesday, April 28, 2009 10:08 PM To: MS EXCEL AND VBA MACROS Subject: $$Excel-Macros$$ Use VBA to determine Windows Groups permissions for a folder I currently have a VBA function that, supplied with the name of a Windows Group, retrieves the names of the members of the group. (it uses GetObject("WinNT://" & strDomain & "/" & strGroup & ",group")) Using this info, I do a variety of things, including notification of changes to the contents of the folder. This works fine for the network shares that I own, because I know the names of the Windows groups assigned to each share. But now, I am challenged by the need to first use VBA to determine the names of the Windows Groups and levels of permissions for a specific file/folder. THEN expand the groups to process the members. (I have to customize the notifications based on the level of read/ write permissions) I located a VBScript that seems to use WMI, but cannot get it to work in VBA. Has anyone done something like this? ..... And before you ask... using the GUI to pull 4,000 names and copy/paste them into a spreadsheet and remove duplicates is NOT a solution! thanks, Paul --~--~---------~--~----~------------~-------~--~----~ ------------------------------------------------------------------------------------- Some important links for excel users: 1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at http://www.excelitems.com 2. Excel tutorials at http://www.excel-macros.blogspot.com 3. Learn VBA Macros at http://www.vbamacros.blogspot.com 4. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com If you find any spam message in the group, please send an email to: Ayush Jain @ jainayus...@gmail.com or Ashish Jain @ 26may.1...@gmail.com ------------------------------------------------------------------------------------- -~----------~----~----~----~------~----~------~--~---