+ Reply to Thread
Results 1 to 20 of 20

Active Directory Data Using Macro

  1. #1
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Active Directory Data Using Macro

    Hi Everyone,
    Got answers from my previous inquiries and Im back again to seek for more help ^^

    This time around what i want to do is to be able to pull all the groups a LAN ID is a member of.
    It's like, I will just put the LAN ID on one cell and when I run a Macro, it will return the list of Groups this ID is a member of.


    I have gotten help from romperstomper on my previous post.
    Hope to get help again.
    (http://www.excelforum.com/excel-prog...ing-macro.html)


    Thanks again
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    I'm sure this can be done.
    Last edited by Vincent.Eymard; 11-08-2010 at 10:09 PM.

  3. #3
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Looking forward to your Inputs ^^
    Thanks in advance.

  4. #4
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Please please please.. hope someone out there could help..

  5. #5
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Active Directory Data Using Macro (Part2)

    You'd better look at the attachment you posted.



  6. #6
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Quote Originally Posted by snb View Post
    You'd better look at the attachment you posted.
    Hi snb. I viewed the attachment and looks okay.
    I'm not sure what I'm missing..

  7. #7
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    I hope to get luck and find help today ^^

  8. #8
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Still no luck with this one.. (

  9. #9
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Active Directory Data Using Macro (Part2)

    Try this:
    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  10. #10
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Hi again romperstomper!
    Thank you very much for your help again.
    Tried the script but when I click the button nothing seems to happen.
    Not sure what to do
    Last edited by romperstomper; 11-11-2010 at 03:34 AM. Reason: Remove quote

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Active Directory Data Using Macro (Part2)

    Did you assign the getGroupData macro to the button? If not, then no it won't do anything.

    Please don't quote entire posts when replying to them - it serves no purpose.

  12. #12
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Hi again romperstomper,
    Yup I assigned the button to the macro getGroupData, but when i click nothing seems to happen.
    Unlike with the other script that you helped me with.

  13. #13
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,998

    Re: Active Directory Data Using Macro (Part2)

    Then I guess the login id you entered is incorrect, because the script works fine for me.

  14. #14
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    I provided my own logon ID.
    Hmnnn... Still trying to figure out what might be the problem..

  15. #15
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    It's even more weird this time, when I use a LAN ID such as myself I dont get any result, but when I used the generic ID "guest" there was a result (attached).
    Hope someone can help.

    Thanks again.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Still couldn't get this to work. Hope somebody could help me out.
    Thanks in advance. ^^

  17. #17
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Hope to get help.
    I haven't solved it still, when I use a LAN ID such as myself I dont get any result, but when I used the generic ID "guest" there was a result (attached).
    Hope someone can help.

    Thanks again.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Still looking and seeking for help..

  19. #19
    Registered User
    Join Date
    10-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    82

    Re: Active Directory Data Using Macro (Part2)

    Anyone got the chance to look at this? ^^
    Hope to find help.

    Thanks

  20. #20
    Registered User
    Join Date
    09-18-2012
    Location
    Syracuse
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Active Directory Data Using Macro (Part2)

    Hi Vincent,
    Sorry I know it has been along time since this post. I did get the script working right however. I entered the ID in the same format as it was in the first extraction. For example the ID's came back as Doe, John. So if you enter it in the same format in the second extraction it does work. Your other option would be to change the line below.

    objCommand.CommandText = "SELECT aDSPath FROM 'LDAP://" & objRootDSE.Get("defaultNamingContext") & _
    "' WHERE objectClass='user' And name='" & strUser & "'"

    to

    objCommand.CommandText = "SELECT aDSPath FROM 'LDAP://" & objRootDSE.Get("defaultNamingContext") & _
    "' WHERE objectClass='user' And SAMAccountName='" & strUser & "'"

    Then you can use jdoe rather then doe, John

    Jlynn001

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1