You may need the following as well
Private Declare Function GetComputerName Lib "kernel32" Alias
"GetComputerNam eA" ( _
ByVal lpBuffer As String, _
nSize As Long _
) As Long
Private Const MAX_COMPUTERNAM E_LENGTH = 31
Function ThisComputerNam e() As String
Dim lpBuffer As String
Dim nSize As Long
Dim lngRet As Long
nSize = MAX_COMPUTERNAM E_LENGTH + 1
lpBuffer = Space(nSize)
lngRet = GetComputerName (lpBuffer, nSize)
If lngRet <> 0 Then
ThisComputerNam e = Left(lpBuffer, nSize)
End If
End Function
You can then call
Dim strIP as string
strIP = fGetHostIPAddre sses(ThisComput erName)(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.c om...
Try:
http://www.mvps.org/access/api/api0067.htm
On Sun, 12 Dec 2004 23:02:48 GMT, "HB2" <bg******@comca st.net> wrote:
Is it possible to obtain the IP address of my desktop using a Visual
Basiccommand?
*************** *******
ja************* *@telusTELUS.ne t
remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security