Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Listview Question

Hi I was wondering is there is a way to move a selected record/Row to the top
of the listview control just the like TopIndex in the normal list control?.
TIA
Charles
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listview Question


Hello Charles

you may try

Dim i As Integer
For i = 1 To ListView1.ListItems.Count
ListView1.ListItems(i).EnsureVisible
'8 is the Item to place at TopIndex
If 8 = ListView1.GetFirstVisible.Index Then Exit For
Next i


Regards
miche

--
michelxl
-----------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...fo&userid=1736
View this thread: http://www.excelforum.com/showthread.php?threadid=49823

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Listview Question


Re

and for the Selected item...

Dim i As Integer
For i = 1 To ListView1.ListItems.Count
ListView1.ListItems(i).EnsureVisible
If ListView1.SelectedItem.Index = ListView1.GetFirstVisible.Index The
Exit For
Next i


Regards
miche

--
michelxl
-----------------------------------------------------------------------
michelxld's Profile: http://www.excelforum.com/member.php...fo&userid=1736
View this thread: http://www.excelforum.com/showthread.php?threadid=49823

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView Question vqthomf Excel Programming 0 November 24th 05 01:08 PM
bug listview? RB Smissaert Excel Programming 2 September 2nd 04 02:34 PM
How to use Listview control kvenku[_10_] Excel Programming 2 June 1st 04 05:45 AM
Listview in Excel 97 vba. jaxrpc Excel Programming 3 January 1st 04 03:04 PM
Get items in ListView in columns RB Smissaert Excel Programming 3 October 20th 03 12:39 PM


All times are GMT +1. The time now is 01:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"