+ Reply to Thread
Results 1 to 4 of 4

Just another error message

  1. #1
    Jennifer
    Guest

    Just another error message

    I need some attention!
    Bug says "invalid use of null"
    Private Sub ShowValue(cbo As ComboBox)
    If cbo.ListIndex = -1 Then Exit Sub
    lblShow.Caption = cbo.Value ***************
    End Sub


    *****this is highlighted area.
    When I choose from a combo box in a form i have, I would liek to choose and
    id and in a label it show the name for the id. The cbo works fine if I only
    have 1 bound column but i need it to have 2 in order to show the correct name
    in the label. THis is when I run into this error. Thank you so much, Jennifer
    --
    Though daily learning, I LOVE EXCEL!
    Jennifer

  2. #2
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    for column 1
    cbo.List(cbo.ListIndex, 1)

    for column 2
    cbo.List(cbo.ListIndex, 2)

    Mangesh

  3. #3
    Jennifer
    Guest

    Re: Just another error message

    Sorry, i guess i need more help than that. Were do i put that? Thank you for
    all your help.
    --
    Though daily learning, I LOVE EXCEL!
    Jennifer


    "mangesh_yadav" wrote:

    >
    > for column 1
    > cbo.List(cbo.ListIndex, 1)
    >
    > for column 2
    > cbo.List(cbo.ListIndex, 2)
    >
    > Mangesh
    >
    >
    > --
    > mangesh_yadav
    > ------------------------------------------------------------------------
    > mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
    > View this thread: http://www.excelforum.com/showthread...hreadid=379265
    >
    >


  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    I guess this is what you need.

    lblShow.Caption = cbo.List(cbo.ListIndex, 1) & " " & cbo.List(cbo.ListIndex, 2)

    Mangesh

+ 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