Thanks for that but I get a runtime error. I have added the MS Scripting Runtime library. Screen shot attached. I'm calling the function from the imediate window. This would work for me if I could feed it the username and group. I am right is saying I could change the function to accept ther two variables?
Thanks
Main Topics
Browse All Topics





by: omgangPosted on 2008-01-31 at 11:31:11ID: 20790103
Not sure exactly what you are looking for but here's a sample function that returns all users from an AD group. I use it in vbs to output a list of users to a text file so you'll see some commented code to that effect. I modified it into VBA - you'll see a note to add the MS Scripting Runtime library.
OM Gang
Select allOpen in new window