From: salmaanali on
I am trying to determine if the current user belongs to a certain group
in ActivDir before giving access to a VB6 application.

I am using following code:

Dim blnTemp As Boolean
' Dim usr As IADsUser
' Dim obj As Object
' Dim objGroup As IADsGroup
' Dim strPath As String
' Dim strTemp

' IsGroupMember = False
' strPath = "WinNT://" & DomainName & "/"
' Set objGroup = GetObject("cn=Group
DB_G,ou=groups,DC=AT,dc=Atmosphere,dc=com")
' blnTemp = objGroup.IsMember(strPath & Username)

' For Each obj In objGroup.Members
' If GroupName = obj.Name Then IsGroupMember = True
' Next

I keep on getting runtime error 2147221020 on the Set objGroup line I
have checked to see if the LDAP path is correct and that ADSSecurity
reference is there but I keep on getting this error...please
help!!!!!!!!!!!!!