Connect

Connect (OrgName) {String}
    OrgName - {String} | Optional. Organisation name, 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).  
     RadiusCore.Connect  

     ' Use the return value to detect if connection is successful.  
     If RadiusCore.Connect() = vbNullString Then  
         MsgBox "No connection was selected.", vbInformation + vbOKOnly, "MyAppName"  
     Else  
         ' 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  

 radius_ErrorHandling:  
     ' Implement per RadiusCore error handling example.  
 End Sub