when i hover over an item in list1 and click it , its clicked once but then right after i clicked it how do i make it click auto just once on that same item ? please urgent
Printable View
when i hover over an item in list1 and click it , its clicked once but then right after i clicked it how do i make it click auto just once on that same item ? please urgent
when i single click on any item in list1 it counts as 1 click , right after i clicked it with mouse how do i get the programme to click that same item just once again
i tried
when i click it , it goes to top of the list alwaysCode:Dim J As Integer, ii As Integer
For J = List1.ListCount - 1 To 0 Step -1
If InStr(List1.Text, "@yahoo.com") Then
Else
Text2.Text = "@yahoo.com"
List1.Selected(0) = True
End If
If InStr(List1.Text, "@ort.nl.rogers.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@rogers.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@xtra.co.nz") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@att.net") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@rocketmail.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@ymail.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@yahoo.cn") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@kimo.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@talk21.com") Then
Text2.Text = ""
Else
End If
If InStr(List1.Text, "@btinternet.com") Then
Text2.Text = ""
Else
End If
Exit For
DoEvents
Next J
list1 items
demo1
demo2
demo3
demo4
say i clicked on demo2 once , how do i get programme to click on that just once more
Why did you put in all those empty else statements?
Why do you have an exit for at the bottom of the loop? You do know that it will not loop with this in there right?
Also the doevents will never execute as you are jumping out of the loop on the line before it
Why do you want the program to click you list item again after it is clicked the first time?
You will get better results if you describe what you are trying to accomplish rather than how you are trying to do it.
So what is the actual goal here? It would seem that making the click event fire again is not a good idea and there is probably a better way to do whatever it is you are trying to do.
its ok il figure it out
Try:
Code:Private Sub List1_Click()
Dim i As Integer
Static bClicking As Boolean
If Not bClicking Then
bClicking = True
i = List1.ListIndex
List1.Selected(i) = False
List1.Selected(i) = True
bClicking = False
End If
End Sub
thanks allot bonnie working em :) hugz:blush: