I've a ribbon add-in for Excel where I have some buttons and some comboboxes. I know how to add items to the combobox in Visual Studio but I would like to load the items dynamically on startup reading the values from a textbox.
At the momment I have the following code but I need help on the part where I add the items to the cboDepartamentos combobox.
Can you please help me?
Private Sub Ribbon1_Load(ByVal sender As Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonUIEventArgs) Handles Me.Load
Dim fileName As String = "D:\TextFiles\Departamentos.txt"
Dim lines() As String = IO.File.ReadAllLines(fileName)
For Each line As String In lines
'cboDepartamentos.Items.Add... here's where I need help!