VBA LDAP Lookup in Userform

mjtomey

New Member
Joined
May 7, 2014
Messages
1
Hi guys! I am a student and employee at my university and I am also fairly new to VBA. This is my first post on this forum and I would like to thank everyone in advance for the help.

I currently work for my IT department and we are launching a new phone system. I am working on an script that will allow me to search the campus LDAP by inputting a user's extension. Once the extension is inserted, the "Search LDAP" command button would then fill out "Description", "User ID", "Location", and the full phone number ("Phone") text boxes on the Userform. This would allow a visual inspection for accuracy and allow for modifications to the fields before using the "Send to Excel" button.

I will keep my request short and to the point rather than explaining the entire script in detail...

The script is still lacking the "Search LDAP" functionality. Once I obtain the variables that I need, I know what to do with them from there. I have very minimal experience using LDAP. Furthermore, my limited LDAP experience is pertained to shell commands--not VBA. I have searched the Internet for about a week now trying to obtain as much information as possible on how to do this final feature to my program. I am unable to get anything to work. Unfortunately, nobody within my department is familiar with VBA. I have seen multiple examples of similar type scripts and I am assuming that the below code is along the lines of what I will be starting with. Once the connection is established and the object is created, I assume it is fairly simple to manage the data by placing those variables wherever needed. Again, I truly appreciate your help and patience.

Code:
Set oUser = GetObject("LDAP://ldap.MYCAMPUS.edu/cn=fullname,ou=user,dc=MYCAMPUS,dc=edu")


d9773a47-751a-4b55-b2b0-86ff78e71461.jpg
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,216,124
Messages
6,128,991
Members
449,480
Latest member
yesitisasport

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top