Results 1 to 3 of 3

Thread: VB6, ComboBox, Error?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2000
    Posts
    33
    When I click the drop down arrow on a combobox I see a list of items to select. But if I decide not to click on one and click on the form I get a run-time error, type mismatch error. The line of code it points to is ChanID = CLng(Channel_Select.Text).
    ChanID is declared in General Declarations as a Public, and a Long. The line ChanID = CLng(Channel_Select.Text) is in the Private Sub Channel_Select_Click(). How do I get rid of this problem.

    Thanks,
    Randall

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    New York City
    Posts
    73
    Try this line

    ChanID = Val(Channel_Select.Text)
    Rich

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2000
    Posts
    33
    Thanks Rich it worked!

Posting Permissions

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



Click Here to Expand Forum to Full Width