Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get User Info in VB

Status
Not open for further replies.

battassini

Automotive
Aug 19, 2005
5
0
0
BR
Hello

I would like to get the user name that is filled in [Tools/Options/User Info/Name:] in a VB macro.

Do you know what is the command that do this?
I've tried Application.username, but it returns the Windows username. I need the Sollid Edge username.

Thankyou if you can help me!

Bye
 
Replies continue below

Recommended for you

I found the answer to my own question:

I discovered that this informations are saved in the Windows Registry, so I`m getting this key value with Visual Basic functions.
This solution has a problem, because I`ve to describe the SE version in the key address (Version 17), and it would not run in new verions. So I created a string with the funcion objapp.version, extracting the version string, and it works fine.

By the way, if anyone has a better solution, please tell us.

Thanks
 
Hi,

Oops! Gears not shifted in properly you already described
how to get the version -- read operation failed ;-)

No, I don't think there is a better solution, sometimes
you have to go via the Windows API to obatin som information
because it's only stored there and SE has no direkt method
to retrieve.

dy
 
Status
Not open for further replies.
Back
Top