You may need the following as well
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNameA" ( _
ByVal lpBuffer As String, _
nSize As Long _
) As Long
Private Const MAX_COMPUTERNAME_LENGTH = 31
Function ThisComputerName() As String
Dim lpBuffer As String
Dim nSize As Long
Dim lngRet As Long
nSize = MAX_COMPUTERNAME_LENGTH + 1
lpBuffer = Space(nSize)
lngRet = GetComputerName(lpBuffer, nSize)
If lngRet <> 0 Then
ThisComputerName = Left(lpBuffer, nSize)
End If
End Function
You can then call
Dim strIP as string
strIP = fGetHostIPAddresses(ThisComputerName)(1)
which should give you the IP address of the computer you are on.
--
Terry Kreft
MVP Microsoft Access
"Jack MacDonald" <ja**************@telus.net> wrote in message
news:30********************************@4ax.com...
Try:
http://www.mvps.org/access/api/api0067.htm
On Sun, 12 Dec 2004 23:02:48 GMT, "HB2" <bg******@comcast.net> wrote:
Is it possible to obtain the IP address of my desktop using a Visual
Basiccommand?
**********************
ja**************@telusTELUS.net
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security