connecting to a SQL Server using ADO is pretty simple, and just as simple connecting to a remote one as a local one.

this function will return an open connection to a SQL Server... replace the DBNAMEHERE,PASSWORDHERE, etc with your own values.
VB Code:
  1. Public Function OpenCN() As ADODB.Connection
  2.  
  3. On Error GoTo EH:
  4.  
  5.     Set OpenCN = New ADODB.Connection
  6.    
  7.     '*********************************************
  8.     'SQL SERVER CONNECTION
  9.     OpenCN.ConnectionString = "Provider=SQLOLEDB;Persist Security Info=false;User ID=USERIDHERE;pwd=PASSWORDHERE;Initial Catalog=DBNAMEHERE;Server=SERVERNAMEHERE;Database=DBNAMEHERE;Locale Identifier=1033;Connect Timeout=10;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096"
  10.     '*********************************************
  11.    
  12.     OpenCN.Open
  13.    
  14.     Exit Function
  15.  
  16. EH:
  17.     MsgBox "Error connecting to SQL Server.", vbCritical
  18.     Set OpenCN = Nothing
  19. End Function