combo box problem

G

Guest

Hi, I want to put a combobox in one of my excels sheet, (a code combobox, not
a form combobox), inserting a subform and inside the subform the combobox is
easy, but I don’t want to use subforms, so I Have the following code:

Private Sub CommandButton1_Click()
If ComboBox1.Visible = True Then
ComboBox1.Visible = False
Else
ComboBox1.Visible = True
asas
End If

End Sub

Private Sub asas()
ComboBox1.AddItem "Mesones", 1
ComboBox1.AddItem "Fray Servando", 2
ComboBox1.AddItem "Empresa", 3
ComboBox1.AddItem "Israel", 4
ComboBox1.AddItem "Consumo Interno", 5
ComboBox1.AddItem "Otros", 6
ComboBox1.DropDownLines = 3
ComboBox1.DropDownWidth = 75
ComboBox1.ListIndex = 0

End Sub

Could someone tell me how to do what I want to do???
PD. I also checked with private sub combobox1_initialize() giving me bad
results.
Thanks.
 
B

Bob Phillips

See your post of 16th April

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
G

Guest

Sorry, but I didn't understand preaty well what you want me to do, I bought a
VB for dummies book a month ago, so I need a dummies response, could you
pleade answer me as easy as posible???
TIA
 
B

Bob Phillips

In the previous post, I asked a question as your example code confused me a
bit.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top