ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   easy combo box issue (https://www.excelbanter.com/excel-programming/289762-easy-combo-box-issue.html)

jasonsweeney[_35_]

easy combo box issue
 
Problem With a combo box. For some reason, the combo box will no
populate until someone clicks onto the combobox and tries to ente
text. Then the proper list displays. If you just click on the comb
box, its empty.

Here is the code I used:
_____________
Private Sub defaultscorecombobox_Change()

Dim defaultlist As Variant
defaultlist = Worksheets("SPSOP").Range("Z2:Z11")
Mastercontrol.defaultscorecombobox.List = defaultlist


End Sub
___________

--
Message posted from http://www.ExcelForum.com


Beto[_3_]

easy combo box issue
 
jasonsweeney < wrote:

Problem With a combo box. For some reason, the combo box will not
populate until someone clicks onto the combobox and tries to enter
text. Then the proper list displays. If you just click on the combo
box, its empty.

Here is the code I used:
_____________
Private Sub defaultscorecombobox_Change()

Dim defaultlist As Variant
defaultlist = Worksheets("SPSOP").Range("Z2:Z11")
Mastercontrol.defaultscorecombobox.List = defaultlist


End Sub


That's because you're using the change event to populate the combobox,
hence it is populated when someone enters text. You have to put this
piece of code in the Userform_Initialize event.

Regards,
--
Beto
Reply: Erase between the dot (inclusive) and the @.
Responder: Borra la frase obvia y el punto previo.



All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com