How to capture user ID in Excel macro?

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

Guest

Dear all,

I have an Excel macro program which uses ADO connection. It connects to our
AS/400 database. When the program connects to the AS/400 system for the first
time after the program is opened, it prompts a AS/400 login dialogue box and
then the user keys in his/her user name and password. If I want to capture
the user name from the AS/400 login dialogue box, then how to do it? How to
write the code in Excel macro? Is it possible?
Thanks in advance!

Ivan
 
Don't know about capturing it from the dialog box, but this returns the
login user id

environ("UserName")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top