PC Review


Reply
Thread Tools Rate Thread

Another ListView question

 
 
whistler
Guest
Posts: n/a
 
      9th Jul 2007
I have a listview in a form where I am trying to permit users sorting by clicking on column headers.

I came up with this.....

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As MSComctlLib.ColumnHeader)
ListView1.Sorted = False
ListView1.SortKey = ColumnHeader.Index - 1

If ListView1.SortOrder = lvwAscending Then
ListView1.SortOrder = lvwDescending
Else
ListView1.SortOrder = lvwAscending
End If

ListView1.Sorted = True
End Sub




But now I get the error

Procedure declaration does not match description of event or procedure having same name

Can somebody give me a clue ?

regards, JOs


--------------= Posted using GrabIt =----------------
------= Binary Usenet downloading made easy =---------
-= Get GrabIt for free from http://www.shemes.com/ =-

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      10th Jul 2007
If you add the ColumnClick event through the VB Editor, you'll find the
definition is

Private Sub ListView1_ColumnClick(ByVal ColumnHeader As Object)

End Sub


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"whistler" <(E-Mail Removed)> wrote in message
news:f6u02k$4e6$(E-Mail Removed)...
>I have a listview in a form where I am trying to permit users sorting by
>clicking on column headers.
>
> I came up with this.....
>
> Private Sub ListView1_ColumnClick(ByVal ColumnHeader As
> MSComctlLib.ColumnHeader)
> ListView1.Sorted = False
> ListView1.SortKey = ColumnHeader.Index - 1
>
> If ListView1.SortOrder = lvwAscending Then
> ListView1.SortOrder = lvwDescending
> Else
> ListView1.SortOrder = lvwAscending
> End If
>
> ListView1.Sorted = True
> End Sub
>
>
>
>
> But now I get the error
>
> Procedure declaration does not match description of event or procedure
> having same name
>
> Can somebody give me a clue ?
>
> regards, JOs
>
>
> --------------= Posted using GrabIt =----------------
> ------= Binary Usenet downloading made easy =---------
> -= Get GrabIt for free from http://www.shemes.com/ =-
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Listview question BobLaughland Microsoft ASP .NET 1 8th Dec 2008 08:01 AM
Listview question Adrian Microsoft C# .NET 2 22nd Oct 2007 11:20 PM
Listview question DBC User Microsoft C# .NET 1 3rd Sep 2006 02:20 AM
Listview question Kay Microsoft VB .NET 5 22nd Aug 2006 12:34 PM
Re: Yet another listview question Aaron Microsoft Dot NET Compact Framework 1 16th Mar 2005 07:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:20 AM.