Link to home
Create AccountLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Excel AddIn System.NullReferenceException

Hi. I am using the following code when trying to log into Xero in my Excel Add-in and getting the error below.
This might be because there are two companies

    _xero.Companies.ForEach(Sub(x)
                                    Dim item = Globals.Factory.GetRibbonFactory().CreateRibbonDropDownItem()
                                    item.Label = x.TenantName
                                    item.Tag = x.TenantId.ToString
                                    cbCompanies.Items.Add(item)
                                End Sub)

Open in new window


User generated image
ASKER CERTIFIED SOLUTION
Avatar of ste5an
ste5an
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer