Option Compare Database Option Explicit Private Const MAX_PREFERRED_LENGTH As Long = -1 Private Const NERR_SUCCESS As Long = 0& Private Const ERROR_MORE_DATA As Long = 234& Private Const SV_TYPE_ALL As Long = &HFFFFFFFF Private Type SERVER_INFO_100 sv100_platform_id As Long sv100_name As Long End Type Private Declare Function NetServerEnum Lib "netapi32" _ (ByVal servername As Long, _ ByVal level As Long, _ buf As Any, _ ByVal prefmaxlen As Long, _ entriesread As Long, _ totalentries As Long, _ ByVal servertype As Long, _ ByVal domain As Long, _ resume_handle As Long) As Long Private Declare Function NetApiBufferFree Lib "netapi32" _ (ByVal Buffer As Long) As Long Private Declare Sub CopyMemory Lib "kernel32" _ Alias "RtlMoveMemory" _ (pTo As Any, uFrom As Any, _ ByVal lSize As Long) Private Declare Function lstrlenW Lib "kernel32" _ (ByVal lpString As Long) As Long Function RellenaCombo(Optional sDomain As String) As String Dim bufptr As Long Dim dwEntriesread As Long Dim dwTotalentries As Long Dim dwResumehandle As Long Dim se100 As SERVER_INFO_100 Dim success As Long Dim nStructSize As Long Dim cnt As Long Dim Devuelve As String nStructSize = LenB(se100) success = NetServerEnum(0&, _ 100, _ bufptr, _ MAX_PREFERRED_LENGTH, _ dwEntriesread, _ dwTotalentries, _ SV_TYPE_ALL, _ 0&, _ dwResumehandle) If success = NERR_SUCCESS And _ success <> ERROR_MORE_DATA Then For cnt = 0 To dwEntriesread - 1 CopyMemory se100, ByVal bufptr + (nStructSize * cnt), nStructSize Devuelve = Devuelve & GetPointerToByteStringW(se100.sv100_name) & ";" Next End If Call NetApiBufferFree(bufptr) RellenaCombo = Nz(Devuelve, "") End Function Public Function GetPointerToByteStringW(ByVal dwData As Long) As String Dim tmp() As Byte Dim tmplen As Long If dwData <> 0 Then tmplen = lstrlenW(dwData) * 2 If tmplen <> 0 Then ReDim tmp(0 To (tmplen - 1)) As Byte CopyMemory tmp(0), ByVal dwData, tmplen GetPointerToByteStringW = tmp End If End If End Function Carlos, para rellenar el combo con los equipos de la red, bastarķa desde el formulario, poner Me.ComboEquiposRed.RowSource=RellenaCombo