LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Array again limit

using the following to get Active Directory group membership, is it possible
that once I return a value say "Bob Smith" that is NOT unique this will
stop. I return 1499 members names no matter how many people are in the
group. I've added people to the group to be sure, I still get 1499 as a
result.

I am NOT returning a domain ID which would be unique, so perhaps that's an
issue.



Sub ADGroupMembers()
Dim arrNames()
intSize = 0

'Let's clear the range first
Range("SESCREEN").ClearContents

'Get the AD Group Info for BATY-SESCREEN
Set objGroup = GetObject("LDAP://CN= BATY-SESCREEN,OU=Security
Groups,DC=baty,DC=com")

'Getting User Names and increase the array size
For Each strUser In objGroup.Member
Set objuser = GetObject("LDAP://" & strUser)
ReDim Preserve arrNames(intSize)
arrNames(intSize) = objuser.CN
intSize = intSize + 1
Next

'In order to sort, we have to convert to Uppercase.
For i = (UBound(arrNames) - 1) To 0 Step -1
For j = 0 To i
If UCase(arrNames(j)) UCase(arrNames(j + 1)) Then
strHolder = arrNames(j + 1)
arrNames(j + 1) = arrNames(j)
arrNames(j) = strHolder
End If
Next
Next

'Fill the SESCREEN range with the array values
Range("SESCREEN").Value = WorksheetFunction.Transpose(arrNames)

End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup Array limit? frankjh19701 Excel Worksheet Functions 0 January 7th 11 06:16 PM
Array Limit Striker3070 Excel Programming 4 May 2nd 10 07:01 PM
Limit on array formula LizM Excel Worksheet Functions 3 September 26th 06 02:27 AM
Array size limit Myles[_69_] Excel Programming 19 August 16th 06 08:09 PM
Determining Array Limit Chaplain Doug Excel Programming 3 January 5th 05 01:37 AM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"