CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2009
    Posts
    8

    urgent excel data help

    i have created an excel file.i need to check if the value of one the cell value and if true display other cell values in a listbox.all i m getting is a blank listbox.
    For i = 2 To i = 100


    If (xlsheet.Range("2,i").Value = ("GAME")) Then
    a = (xlsheet.Range("1,i").Value)
    List1.AddItem (a)


    End If
    Next i
    help needed

  2. #2
    Join Date
    Feb 2002
    Location
    Makati City, Philippines
    Posts
    1,054

    Re: urgent excel data help

    Check first if the list box you have inserted is an activeX or from excel form menu. The later can only fetch data by setting one of its property to a range of cells.

    Another thing to check is the text comparision -- if you dont have Option Compare Text at the top of the module, a "GAME" would be different from a "Game"
    Marketing our skills - please participate in the survey and share your insights
    -

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

Featured