CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Listbox items

  1. #1
    Join Date
    May 1999
    Location
    Bogotá, Colombia
    Posts
    37

    Listbox items

    Is it possible to recognize an item in a listbox as something other than a string? Specifically, I have some listboxes containing dates and I need to be able to assign the value to a variable as a date and not a string. Is this possible or am I way off base?

    thanks,

    Andrew


  2. #2
    Join Date
    Sep 1999
    Location
    Red Wing, MN USA
    Posts
    312

    Re: Listbox items

    You could easily apply the CDate Function on the List Item, eg.

    MyDate = CDate(List1.List(iIndex))

    Where iIndex is the Index No. of the List Item.


    Aaron Young
    Analyst Programmer
    [email protected]
    [email protected]
    Aaron Young
    Senior Programmer Analyst (Red Wing Software)
    Certified AllExperts Expert

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