Results 1 to 6 of 6

Thread: [RESOLVED] How to sent Listview column header to listbox

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Resolved [RESOLVED] How to sent Listview column header to listbox

    I would like to know, I have listview column header, how I can sent this column header to the listbox, because I want only selected column header in the listbox to print out on the document.Have idea or sample to start?

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: How to sent Listview column header to listbox

    I hope the same answer to your other thread would solve this too...anyway here it is
    vb Code:
    1. List1.AddItem Form5.ListView2.ColumnHeaders(1).Text
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: How to sent Listview column header to listbox

    It work, But how I can get all listview column header without specific the number to the listbox?
    Code:
    List1.AddItem Form5.ListView2.ColumnHeaders(1).Text

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: How to sent Listview column header to listbox

    vb Code:
    1. For i = 1 To ListView2.ColumnHeaders.Count - 1
    2.     List1.AddItem ListView2.ColumnHeaders(i).Text
    3. Next
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: How to sent Listview column header to listbox

    In my listbox, I found that you miss one field name at the end of the listview, so I modify to this, and it works contains all listview column header. Thank you. I rate you

    Code:
    For i = 1 To Form5.ListView2.ColumnHeaders.Count
    List1.AddItem Form5.ListView2.ColumnHeaders(i).Text
    Next i

  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: [RESOLVED] How to sent Listview column header to listbox

    Quote Originally Posted by matrik02
    In my listbox, I found that you miss one field name at the end of the listview, so I modify to this, and it works contains all listview column header
    OH sorry for that...
    Quote Originally Posted by matrik02
    I rate you
    Thank you
    If an answer to your question has been helpful, then please, Rate it!

    Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.


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