pedrosfaria
Technical User
This should be straightforward but it keeps me giving me an error.
I have a ComboBox in a sheet named "Folha1", como named cbboLocalidade.
I want to initialize that combo with a value. That combo is a two column combo but that should be no problem.
I assign values to other combo's (but just of 1 column) and work's fine. When I try to assign to Combo cbboLocalidade -it gives me "time error 380" over and over again.
The code I use is
Sub Workbook_Open()
Folha2.Activate
Folha1.Activate
Folha1.cbboAnimais = "Suínos"
Folha1.cbboPaises = "Argentina"
Folha1.cbboRegiao = "Buenos Aires"
Folha1.cbboLocalidade = 2
End Sub
The bound colum is numeric. i've allready tried
Folha1.cbboLocalidade = "2"
and
Folha1.cbboLocalidade.Value = 2
but gives me the same error.
Can someone help me? Do you know another wat of setting a default value for a combo in initialization?
Thx
Pedro
I have a ComboBox in a sheet named "Folha1", como named cbboLocalidade.
I want to initialize that combo with a value. That combo is a two column combo but that should be no problem.
I assign values to other combo's (but just of 1 column) and work's fine. When I try to assign to Combo cbboLocalidade -it gives me "time error 380" over and over again.
The code I use is
Sub Workbook_Open()
Folha2.Activate
Folha1.Activate
Folha1.cbboAnimais = "Suínos"
Folha1.cbboPaises = "Argentina"
Folha1.cbboRegiao = "Buenos Aires"
Folha1.cbboLocalidade = 2
End Sub
The bound colum is numeric. i've allready tried
Folha1.cbboLocalidade = "2"
and
Folha1.cbboLocalidade.Value = 2
but gives me the same error.
Can someone help me? Do you know another wat of setting a default value for a combo in initialization?
Thx
Pedro