Reputation: 136
Might be easy, but how do I link a form comboxbox value to a cell or a dropdown list of cells ? In my case a 1 or 2 dimensional with month - year or month txt - month nr value or array needs to be linked to a form combobox.
The result should be that when I change the form combobox value it also updates the excel cell or cells (the 2 cells combination above) and also the other way around, when I update the cell or cells, it also updates the form combobox value.
Atm, I only have it one way, from form combobox to value by using the built in sub.
Sub ComboBox1_Change()
ThisWorkbook.Sheets("List").Range("G2").value = Form1.ComboBox1.Value
End Sub
Upvotes: 0
Views: 2014
Reputation: 136
After some digging around, I have found the answer to be in the Combobox
properties window, ControlSource
. I put there in my case 'List'!G2
and combined with the Sub ComboBox1_Change()
it updates the month both ways.
Upvotes: 1