View Full Version : computer name retrieve


civ
09-09-2006, 11:03 PM
Hello,

I need to retrieve the computer name from running application. I didn't find any function for that (for VBA 2000). Can anybody help me?

Thanks.

mhartman
09-10-2006, 05:32 AM
Hello
Please see the enclosed example. This would be one way.
Regards
Mark

ghudson
09-11-2006, 10:37 AM
Yuck! All that code just to retrieve something so simple.

The Environ() function will that and much more.

MsgBox "Network Name = " & Environ("username")
MsgBox "Computer Name = " & Environ("computername")

Search the forum for the keyword ENVIRON and my user name for I have a sample db posted somewhere that will list all of the Environ variables.