Consulting

Results 1 to 3 of 3

Thread: combobox

  1. #1
    VBAX Newbie
    Joined
    Dec 2006
    Posts
    5
    Location

    Angry combobox

    Good day VB experts!I have a problem on my current VBA excel. There are 2 columns that a user wants to select or type to search. Column A contains partcodes and ColumnB contains partnumbers. What codes to use when an optionbutton1 clicks the combobox rowsource is that of columnA and when optionbutton2 clicks the Rowsource is that of column B.Also pls consider the user to type on the combobox to whatever he wants to search.Thanks.Hamz

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Private Sub OptionButton1_Click()
    ComboBox1.RowSource = "A1:A10"
    End Sub

    Private Sub OptionButton2_Click()
    ComboBox1.RowSource = "B1:B10"
    End Sub
    [/vba]

  3. #3
    VBAX Regular
    Joined
    Dec 2006
    Posts
    22
    Location

    Red face

    Check if it will help you: http://www.vbaexpress.com/kb/getarticle.php?kb_id=824 , there?s a file attached.

    rgds

Posting Permissions

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