+ Reply to Thread
Results 1 to 2 of 2

=?Utf-8?Q?Heeeelp_with_combos=C2=A1=C2=A1=C2=A1?=

  1. #1
    filo666
    Guest

    =?Utf-8?Q?Heeeelp_with_combos=C2=A1=C2=A1=C2=A1?=

    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.


  2. #2
    Bob Phillips
    Guest

    Re: Heeeelp with combosˇˇˇ

    How did you create this dropdown, from the controls toolbox, or via code. If
    the latter, show us the code.

    --

    HTH

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


    "filo666" <[email protected]> wrote in message
    news:[email protected]...
    > 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.
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1