Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MouseDown Event with ListView Control

Status
Not open for further replies.

agfon

Programmer
Mar 25, 2005
38
US
Has anyone actually used the mousedown event with a ListView Control?

When ever I try the following code, I get an error message:

The expression MouseDown you entered as the event property setting produced the following error: Proceedure declaration does not match description of event or procedure having the same name.

Here's the code:

[blue]Private Sub ListView1_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
Msgbox X
End Sub[/blue]

I would appreciate any input. Thanks.

-agfon
 
This is code for vb you are using vba
under the form module window in the left option box choose listview1. then in the right dropdown choose the action mousedown this will automatically fill in the proper event declares for you.

would be more like
Private Sub ListView1_MouseDown (ByVal Button As Integer, ByVal Shift As Integer, ByVal X As long, ByVal Y As long)
Msgbox X
End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top