Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng on being selected by the Eng-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
Joined
Aug 19, 2005
Messages
5
Location
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
 
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,

to get the Version the simple way you can use this

Dim sVers as String
sVers = Left(objSeApp.Version, 2)

dy
 
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.

Part and Inventory Search

Sponsor

Back
Top