Retrieve the Current Users User Object

Can anyone point me at a code snippet that will grab the current users "User" object from AD?

I've found endless examples of querying LDAP using a recordset, but not using the system object model. I found it some months back but can't find it now!

Thanks

Gordon

March 12th, 2015 4:26am

You can consider using Microsoft Power Query for Excel. It's a free add-in for Office 2010, 2013 & Office 365 Professional Plus and Excel Standalone editions.

With Power Query you can easily import data from your AD with a simple user interface. The results can be loaded to your worksheet and be updated via Data->Refresh. No need to write code.

You can download Power Query Add-in here.

Once installed, you can follow these simple instructions to start import form Active Directory.

Free Windows Admin Tool Kit Click here and download it now
March 12th, 2015 5:47am

You can consider using Microsoft Power Query for Excel. It's a free add-in for Office 2010, 2013 & Office 365 Professional Plus and Excel Standalone editions.

With Power Query you can easily import data from your AD with a simple user interface. The results can be loaded to your worksheet and be updated via Data->Refresh. No need to write code.

You can download Power Query Add-in here.

Once installed, you can follow these simple instructions to start import form Active Directory.

How would I implement this in VBA? I'm not after an import, I need to retrieve the information for the current user so it can be used in the code.

Thanks

March 12th, 2015 9:09pm

Hi,

According to your description, you issue is more related to VBA code, and this is the forum to discuss questions and feedback for Microsoft Excel, I recommend you post the question toMSDN forum for Visual Basic for Applications

http://social.msdn.microsoft.com/Forums/en-US/home?forum=isvvba

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
March 13th, 2015 2:27am

This is getting very confusing George. People have been telling me to move things from the Office community site to this one when it's code related, now you tell me it's got to go somewhere else.

I try to put things in the right place the first time so I don't have to wait several days to get a response. Being in Australia means I usually get a response during the night after I ask a question. Have to keep moving things just chews up more nights/days.

Can you give me some guidelines? ie All VBA stuff goes here, all user interface questions go here, power pivot stuff goes here (though it is part of the user interface as opposed to VBA),...

Thanks

Gordon

I've now found another way to do this using the Outlook model, so it's now kind a moot point.
March 13th, 2015 2:37am

Hi Gordon,

I'm glad to hear that you find the direction of this issue. Let me explain the support scope of the current forum

This forum is for general questions and feedback related to Microsoft Excel (all versions), not includes the Excel develop issue. Thus, if the issue is related to Excel DEV, we'll recommend our customer post the question to MSDN forum. They are the specialists of Office DEV. (Sorry, I'm not familiar with VBA. Thus, I still recommend you open a new thread in MSDN forum.)

Thanks for your understanding.

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
March 13th, 2015 2:52am

Thanks George. One more question, what is the difference in scope between this forum and the answers.microsoft community forums? I've been advised to move things from there to here in the past.

Thanks

Gordon

March 13th, 2015 3:05am

Hi,

As far as I know, Microsoft Answers: Microsoft Office forum is the official end-user forum about basic usage questions with Microsoft Office.

TechNet  Excel IT Pro Discussions: This forum is for IT Professional discussions, questions and feedback involving Microsoft Excel.

MSDN  Office for Developers: This forum is for Developer discussions and questions involving Microsoft Office.

Thanks for your understanding.

George Zhao
TechNet Community Support

Free Windows Admin Tool Kit Click here and download it now
March 13th, 2015 3:18am

This is getting very confusing George. People have been telling me to move things from the Office community site to this one when it's code related, now you tell me it's got to go somewhere else.

I try to put things in the right place the first time so I don't have to wait several days to get a response. Being in Australia means I usually get a response during the night after I ask a question. Have to keep moving things just chews up more nights/days.

Can you give me some guidelines? ie All VBA stuff goes here, all user interface questions go here, power pivot stuff goes here (though it is part of the user interface as opposed to VBA),...

Thanks

Gordon

I've now found another way to do this using the Outlook model, so it's now kind a moot point.
  • Edited by d0gknees Friday, March 13, 2015 6:36 AM
March 13th, 2015 6:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics