Hi guys,
Yesterday I got some stuff working with dropping content from listbox to listbox.
No I'm trying to get a path from an external file, but I'm still not able to figure out a way to get the filepath...
This is what I have:
I thought maybe something as Data.Files(1) would work but it doesn't. The Drag and drop feature works fine though if I say for example Me.test = "check" than it becomes that after dragging the file.
Any suggestions how to get the filepath??
Thank you
Yesterday I got some stuff working with dropping content from listbox to listbox.
No I'm trying to get a path from an external file, but I'm still not able to figure out a way to get the filepath...
This is what I have:
Code:
Private Sub test_BeforeDragOver(ByVal Cancel As MSForms.ReturnBoolean, ByVal Data As MSForms.DataObject, ByVal X As Single, ByVal Y As Single, ByVal DragState As Long, _
ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
Cancel = True
Effect = 1
End Sub
Private Sub test_BeforeDropOrPaste(ByVal Cancel As MSForms.ReturnBoolean, ByVal Action As Long, ByVal Data As MSForms.DataObject, ByVal X As Single, _
ByVal Y As Single, ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
Cancel = True
Effect = 1
Dim MyDataObject As DataObject
Set MyDataObject = New DataObject
'MyDataObject = GetObject(Data.Files(1))
Me.test = MyDataObject
End Sub
I thought maybe something as Data.Files(1) would work but it doesn't. The Drag and drop feature works fine though if I say for example Me.test = "check" than it becomes that after dragging the file.
Any suggestions how to get the filepath??
Thank you