Can the Windows Dialog stop VBA code from running

darbid

Registered User.
Local time
Today, 11:41
Joined
Jun 26, 2008
Messages
1,428
The Windows Dialog comes from a HTML page where you enter a filepath and click the open button.

But from what I can see in debug mode that as soon as the windows dialog is opened my code simply stops till i close the dialog.

Is this normal, expected?
 
a dialog from is normally modal, and vba opens it, so that nothing else happens until the form is closed.

if your module includes code, you can probably find the line that actually opens the window to verify this is the case.

This DOES make sense - you normally call this function with a line such as

filename = getfileusingdialog

which clearly needs the function on the right hand side to complete (therefore you to select a file and close the window) before your program can continue
 
This DOES make sense - you normally call this function with a line such as
filename = getfileusingdialog
Agreeing with you 100%. The thing is that this is on a HTML page (a webpage) so I am just clicking a button on the page. (the webpage is an intranet outhwise I would provide a link).

I then wanted to get a handle on the Dialog so that I could automatically add my file path/name.

I have noticed that the page fires up java and java sits in my system tray while this page is open. Can it be that java opens this dialog and then stops my computer from doing anything till I close it?
 
Just to finish off this thread - It appears I am not a winner.

A Recap


  • I have the webbrowser control on an Access form.
  • I am filling out a Web form to upload a file.
  • HTML has a special textbox of Type="File" which does not allow you to enter text in it (if it did any program could automatically upload your files)
  • There are two solutions, 1. Sendkeys 2. get a handle on the OPEN windows dialog and enter your file path/name in the textbox of the dialog.
  • I could get the "BROWSE" button and click this which brought up the dialog.
  • The code then stops/pauses till the dialog is closed.
  • It appears that Java is opening and closeing this dialog.
  • I asked on the SunMicrosystems Forum about this and they said it is possible for the Java applet to be doing this.

Possible Solution for Sometime in the future
It seems that only the webbrowser control and myform is paused.
For example I can go to another program and work away as long as I want.
Thus I am thinking that if I make a .dll which accept the HTMLElement to click, and the path name, then as the .dll is not part of Access it should not be stopped by the Java.

If you have got this far I would be interested on your thoughts before I do that.

Also if you have got this far thank you.
 

Users who are viewing this thread

Back
Top Bottom