Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Name of computer

Posted on 1998-12-14
4
Medium Priority
?
150 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 4

Accepted Solution

by:
chabaud earned 0 total points
ID: 1449960
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
ID: 1449961
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
ID: 1449962
Thanks for the answer it really works
0
 
LVL 4

Expert Comment

by:chabaud
ID: 1449963
Thanks for you no point !

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

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses

715 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