Connect (OrgName) {String}

OrgName - {String} OPTIONAL

Name of Xero organisation, to use an existing connection without showing the connection UI.

Connect a new or existing Xero/Practice Manager entity to the Active Workbook. Returns the organisation name of the selected Xero/Practice Manager entity.

Public Sub radius_Sample()  
     ' Error handling.  
     On Error GoTo radius_ErrorHandling  

     ' Show connection UI so user can select a Xero connection (new or existing).  

     ' Use the return value to detect if connection is successful.  
     If RadiusCore.Connect() = vbNullString Then  
         MsgBox "No connection was selected.", vbInformation + vbOKOnly, "MyAppName"  
         ' An entity has been connected, do something else.  
         ' i.e. RadiusCore.CreateReport, RadiusCore.CreateAPIClient  
     End If  

     ' Use connection for Xero entity 'ABC Ltd' (must be an existing RadiusCore connection).  
     RadiusCore.Connect ("ABC Ltd")  

     Exit Sub  

     ' Implement per RadiusCore error handling example.  
 End Sub