AlexanderBB
Well-known Member
- Joined
- Jul 1, 2009
- Messages
- 2,092
- Office Version
- 2019
- 2010
- Platform
- Windows
VBA Code:
Private Type POINTAPI
x As Long
y As Long
End Type
Private Type LVHITTESTINFO
pt As POINTAPI
flags As Long
iItem As Long
iSubItem As Long
End Type
Private Const LVM_SUBITEMHITTEST As Long = &H1039
Private Const LVHT_ONITEM As Long = &HE
Private Declare Function SendMessage Lib "user32" Alias "SendMessageW" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
VBA Code:
Dim hitTest As LVHITTESTINFO
With hitTest
.flags = LVHT_ONITEM
.pt.x = (x) ' \ Screen.TwipsPerPixelX)
.pt.y = (y) ' \ Screen.TwipsPerPixelY)
End With
SendMessage NAME.hWnd, LVM_SUBITEMHITTEST, 0, hitTest
It is happening when moving items from one list into another. Perhaps on 2nd or Next time.