+ Reply to Thread
Results 1 to 2 of 2

LDAP Issue Using Excel VBA

  1. #1
    Registered User
    Join Date
    10-15-2014
    Location
    Malibu, CA
    MS-Off Ver
    2010
    Posts
    1

    LDAP Issue Using Excel VBA

    Note: I was forced to use the words WEB_ADDRESS after LDAP: instead of the true Web Address. Please note that I am aware that there needs to be two diagonal lines (//) before the WEB_ADDRESS.
    **********************************************************************************************************************************************************************************
    I am hoping someone on here is both an LDAP and Excel VBA expert as I am at a lost. I had some code that worked when we had an LDAP address with an open Port. However, the company has locked things down and has closed that Port and created a new Port that requires authentication credentials. I have tried and tried to get this to work, but to no avail. Here is the code (with some things marked out for security reasons) that worked with the "open Port" (636):

    Please Login or Register  to view this content.
    I was told that I must now access the LDAP using something like this (non-Excel VBA terms): "ldaps:WEB_ADDRESS:8636" -b 'ou=people,o=xxx,c=us' -D 'cn=FULL NAME,ou=people,o=xxx,c=us' -w 'User PWD' "filter criteria"

    So, I tried the exact same VBA code above but with the following change:

    ADConn.Open "ADs Provider", "cn=MYNAME,ou=people,o=xxx,c=us", MYPASSWORD 'Provide username and password"
    strQuery = "<LDAP:WEB_ADDRESS:8636/ou=people,o=xxx,c=us>;(a1=*abc*);cn"

    However, this has NOT worked. Does anyone know what I am doing wrong?
    Last edited by AliGW; 02-22-2025 at 01:53 AM. Reason: Code tags added - please review the forum guidelines.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,209

    Re: LDAP Issue Using Excel VBA

    Administrative Note:

    Welcome to the forum.

    Is your forum profile up-to-date and showing ONLY the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The four most recent Excel products are Excel 2019, Excel 2021, Excel 2024 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel VBA LDAP Emails Active Directory - Trouble with Range Code
    By Article92 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2022, 07:23 PM
  2. Web Query with parameters (or LDAP)
    By faun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 12:47 PM
  3. LDAP ADO ADSI Problem
    By mcinnes01 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-11-2011, 01:10 PM
  4. LDAP - List all Users
    By anzo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-26-2011, 06:42 AM
  5. Put variable in to LDAP path
    By MrSnoobs in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2010, 05:29 AM
  6. issue in getting connected to LDAP
    By associates in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-05-2009, 12:47 AM
  7. [SOLVED] query LDAP
    By Amedee Van Gasse in forum Excel General
    Replies: 2
    Last Post: 03-30-2005, 07:06 AM

Tags for this Thread

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