I designed a workbook for multiple users (sales people.) Each sales person can access his report by selecting his territory number from a drop-down list cell (validation-list) and then a VBA routine runs which pops up a dialog box for him to enter his password. It then checks his password against the hidden password sheet and if he entered it correctly it unhides his report sheet.

Now, we wish to move the workbook to our intranet where the sales reps logon to the system with special/confidential logon id's. The administrator asked that I place an API call in the workbook that determines the current windows user logged into the machine. Doing this would give us a way in which we could eliminate the VBA login I've built-in to the workbook so users will just enter their one intranet login and still gain access to their specific report in the spreadsheet.

I know zero about API calls, or API for that matter. Can you walk me through how to set up this API call in the workbook?