Solved

Name of computer

Posted on 1998-12-14
4
133 Views
Last Modified: 2010-05-03
How can i get the name of a computer using a VB5 code
Thank You,
Birendra
0
Comment
Question by:kishor33
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
chabaud earned 0 total points
Comment Utility
try the GetComputerName function:

private declare GetComputerName lib "kernel32.dll" (byval buf as string, byref nSize as long)

function GetName()
dim buf as string
buf=space(128)
GetComputerName buf, 128
GetName= trim(buf)
end function

0
 
LVL 3

Expert Comment

by:a111a111a111
Comment Utility
What is this one point?
Do you think this is a game?
Get your points to 50, 100, 200 and let the real work to be done.
Do you like to answer on Q and get one point yourself?

Rise "UP" the points first!
0
 

Author Comment

by:kishor33
Comment Utility
Thanks for the answer it really works
0
 
LVL 4

Expert Comment

by:chabaud
Comment Utility
Thanks for you no point !

Just to encourage you. www.experts-exchange.com really works too !
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now