Obtain the Windows Network User Name

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created an application which allows users to export information to
Excel files on their PCs. To get to the proper location on their PC for "My
Documents", I need the user id.

If anyone knows the code for requesting the user Id, I would really
apprciate your sharing it with me. Or if you know a better solution.

Thanks.
 
The code works. But I do have a question. I placed the public variables on
the form object class I was using above 'Option Explicit' . But Access VB
would not allow "Public" before the constants; that is, those that were not
declared separate from the function results. Am I placing these in the
correct location? As I said, the code works.
 
The code should be put in a stand-alone module, not in the module associated
with a form.
 
It works now. I needed to copy all the code including all the declared
variables and constants outside the main function. Thank you very much.
This has been very helpful.
 
Back
Top