[AccessD] A2003 - Clear Web Browser Control Contents

Darren darren at activebilling.com.au
Tue Aug 13 20:54:25 CDT 2013


Hi All,
I have a web browser control on a form that allows users to 'drag' files from their desktops to get the file name of the 'dropped' file.
Works a treat.
But it seems I can only offer users one go, as I then have to close the form to 'reset' the contents of the Browser control.
As once a file has been 'opened' in the browser control (E.g.  a CSV file) users are not permitted to 'drag' a second or subsequent file to that browser control.
I have tried Me. actXWebBrowserControl.Navigate "" and a few other things but to no avail and with varying error messages.
All I'm really using it for is to get the file name of the 'dropped' file and then run other tasks that' import' this file, once the file name is known.
Being able to see the contents of the file is irrelevant and I'd like to be able to simply drag and drop files to the browser control one after the other.

Any thoughts?

Here's my Code so far that gets the file name and then I run other tasks after that – this will wrap so be aware ☺

Private Sub actXWebBrowserControl_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
Me.txtAssumedFilePath = URL
MsgBox me.txtAssumedFilePath

End Sub




More information about the AccessD mailing list