You will need to set a reference to "Microsoft OLE DB Service Component 1.0 Type library" and then you can call up the dialog like this.
VB Code:
  1. Option Explicit
  2.  
  3. Private Sub cmdConn_Click()
  4.     MsgBox BuildConnectionString
  5. End Sub
  6.  
  7. Private Function BuildConnectionString() As String
  8. Dim objLink As MSDASC.DataLinks
  9. Dim strConn As String
  10.  
  11.     On Error Resume Next
  12.    
  13.     '   Display the dialog
  14.     Set objLink = New MSDASC.DataLinks
  15.     strConn = objLink.PromptNew
  16.    
  17.     If Err.Number = 0 Then
  18.         '   Create a Connection object on this connection string
  19.         BuildConnectionString = strConn
  20.     Else
  21.         '   User canceled the operation
  22.         BuildConnectionString = ""
  23.     End If
  24.    
  25.     Set objLink = Nothing
  26. End Function