Hello everyone,
I have a userform with 20 Comboboxes and I need your advice to identify which ComboBox it was selected last time. If users wants to use this shortcut they will use a doubleclick on Combobox because the single click it needs also to enter a value. I put on doubleclick action this code:
Every ComboBox will have a code like this. After this, i need to use this value to autocomplete, with a command button, a value but i don`t know how to declare this variables.
I don`t know what is wrong here, can you help me with an advice ? It will be great if you have also another solution for this.
Thank you for your help !
I have a userform with 20 Comboboxes and I need your advice to identify which ComboBox it was selected last time. If users wants to use this shortcut they will use a doubleclick on Combobox because the single click it needs also to enter a value. I put on doubleclick action this code:
VBA Code:
Private Sub ComboBox5_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Range("E1").Value = "ComboBox5"
End Sub
Every ComboBox will have a code like this. After this, i need to use this value to autocomplete, with a command button, a value but i don`t know how to declare this variables.
VBA Code:
Private Sub CommandButton17_Click()
Dim X As Integer
X = Range("E1").Value
X.Value = "1"
I don`t know what is wrong here, can you help me with an advice ? It will be great if you have also another solution for this.
Thank you for your help !