I want to write down the path of the file I am dragging into Cell C6.
When I use a ListView inside a form, it works well with this code:
Private Sub ListView1_OLEDragDrop(Data As MSComctlLib.DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
Sheets("Sheet1").[C6].Value = Data.Files(1)
End Sub
When I try the same inside excel (without a form) it doesn't recognize the drag and drop command on the ListView, instead Excel tries to open the file I just dragged and dropped, no matter where I drop it. OLEDragMode and OLEDropMode are set to manual.
What I want is that the path of my file is written into cell C6 without using forms. Any ideas why that doesn't work?

