How do I waiting like Sleep() in a cusomized form's event handler?

G

Guest

Hello,

I make an http Request from my customized message form's MyButton_onclick
handler in Outlook 2003. So I need to wait, after the user has made some
action in the loaded HTML-Formular. Then I'd like to read the results in to
my form.

I havn't found any way to stay waiting in my function. Has anybody any idea?
(Can I access the VBA-modules/classes from my form code?)

Thank you in advance
Alexander
 
H

Hollis D. Paul

I havn't found any way to stay waiting in my function. Has anybody any idea?
(Can I access the VBA-modules/classes from my form code?)
Last I knew you could. Just call them. You may have to include the module
name. As far as I know, there is no way to display a progress bar while a
subroutine is off doing its thing. When running a print job through Word, you
have to force it to run in the foreground, or your code exits the form and
kills the print job before it is done printing.

There has always been a way to sleep, as far as I recall, but I don't remember
the details. I would just try the VB or VBA function call and see if it
works. You never really know how VBscript is different from VB or VBA until
you try a command and it fails. You then ask in the newsgroup, and someone
will say, Oh yeah, that is because that function isn't implemented in
VBscript. Trial and Error is a very strict teacher.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Mukilteo, WA USA
 
G

Guest

Thank you for your answer!

I've tried following alternative ways from the Outlook mail item's VBScript
form code, all of them without success:
1. attempt to bind the kernel32 library to call Win32 API Sleep, because I
didn't found any Sleep-Method in VBA/VBScript.
2. attempt to access my VBA-Project with its name (e.g. Project1.myFunction
following the article http://support.microsoft.com/?id=555159)
3. attempt to define and bind my MyButton_onclick method in the VBA-Project
4. attempt to find a way to call WScript.Sleep()

I didn't found any way to explicitly include the module name. Do you know,
how to do this?

My aim is to let the user click a button. In the onclick event handler a
call InternetExplorer.Application and let the user do some actions. I must
get the results from the explorer application. If I could wait in the
handler, I could take them directly.


Hollis D. Paul said:
I havn't found any way to stay waiting in my function. Has anybody any idea?
(Can I access the VBA-modules/classes from my form code?)
Last I knew you could. Just call them. You may have to include the module
name. As far as I know, there is no way to display a progress bar while a
subroutine is off doing its thing. When running a print job through Word, you
have to force it to run in the foreground, or your code exits the form and
kills the print job before it is done printing.

There has always been a way to sleep, as far as I recall, but I don't remember
the details. I would just try the VB or VBA function call and see if it
works. You never really know how VBscript is different from VB or VBA until
you try a command and it fails. You then ask in the newsgroup, and someone
will say, Oh yeah, that is because that function isn't implemented in
VBscript. Trial and Error is a very strict teacher.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Mukilteo, WA USA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top