About vba method

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

http://vbadud.blogspot.com/2007/05/drag-drop-files-to-text-box.html
Hi,
I'm using vba and access.
How can I get this method in vba?(as in this link)

Code SnippetPrivate Sub TextBox1_OLEDragDrop(Data As DataObject, Effect As
Long, Button As Integer, Shift As Integer, X As Single, Y As Single)

I don't care if it will be for TextBox1 object or hyperlink or ole.
My goal is to get Data.GetFormat!
One more quetion:
Why ole object don't know to get a virtual files like outlook email attached
files?
I need this code in vba
http://www.codeproject.com/vb/net/ExpTreeDragDrop.asp#xx1228231xx
Thanking you in anticipation,
Yael.
 
Thank's for your replay Alex,
1) In tring to to create user form as in youy link, I don't found this in my
access dtabase:
Choose the Shortmenu’s titled (Misc ~ Project Window ~ Insert)

2) About the Ole:
Why ole object don't know to get by drag-and-drop a virtual files like
outlook email attached files from the clipboard?

3)Am I need this example or userform for my goal? my goal is the user could
drag-and-drop all files into the form as full path text or something lige
that.
As in this ** vb ** example but:
http://reliableanswers.com/vb/samples.asp
OLEDragDrop.zip
When I'm running this Drag and Drop from Explorer in ms access 2003.
http://www.mvps.org/access/api/api0032.htm
I added this code because of " In order to test the code in this article,
you will need the AddressOf code as well."
http://www.vbmonster.com/Uwe/Forum.aspx/vb-winapi/2508/Addressof-and-VBA
When I'm running I get RT error "file not found: vba332.dll"
Thank's alottttt!
Yael
 
Thank you sooo
I'm using in ms access 2003,
So I don't need to use user form?
This link needs addressOf......................
 
I'm tring to not use the code for AddressOf , but I can't understand how to
use AddressOf in my code without calling AddrOf(strFunction) - as in this
code, in Sub sHook method calling by Form_Open:

Private Sub Form_Open(Cancel As Integer)
Call sEnableDrop(Me)
Call sHook(Me.hWnd, "sDragDrop")
End Sub

I tried to write:

'AddrOf(strFunction)
Sub sHook(hWnd As Long, strFunction As String)
lpPrevWndProc = apiSetWindowLong(hWnd, GWL_WNDPROC, AddressOf:=sDragDrop)
End Sub

But I'm getting error:
sDragDrop Argument not optional.

Thank's Alex
 
And I tried this to:
AddressOf:=strFunction
but I'm getting error:
AddressOf:=
Named argument not found
 
Sorry for all my posts :)
It's OK now, Running good by this line:
AddressOf sDragDrop
I did all that for drag and drop attached file from outlook 2003.
How can I get the DATA for checking
Data.GetFormat or something like this?
 
Back
Top