Search for the address of a cell filled via a combobox.
Solved
Bonjour,
I have a combobox in a userform. The data for the combobox comes from a table in Sheet1 (list).
For example, list from B3:B9 in my Sheet1
milk
flour
sugar
spices
etc
So far, so good ;)
Now, I would like that when activating a button in this same userform, an "x" is entered on the same row as the value selected in my combobox.
This would give, for example:
I select flour from my list
flour = B4 in Sheet1
I want to have an "x" in D4
Where I'm stuck is in searching for the address of cell B4..
Thank you for your help ;)
Configuration: Windows 7 / Chrome 32.0.1700.102
I have a combobox in a userform. The data for the combobox comes from a table in Sheet1 (list).
For example, list from B3:B9 in my Sheet1
milk
flour
sugar
spices
etc
So far, so good ;)
Now, I would like that when activating a button in this same userform, an "x" is entered on the same row as the value selected in my combobox.
This would give, for example:
I select flour from my list
flour = B4 in Sheet1
I want to have an "x" in D4
Where I'm stuck is in searching for the address of cell B4..
Private Sub Button1_Click()
If Button1.Enabled = True Then
cellule = ComboBox1.ListIndex.Address
Range(cellule.Address).Offset(0, 2).Value = "x"
End If
End Sub
Thank you for your help ;)
Configuration: Windows 7 / Chrome 32.0.1700.102