Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Getting error when using TimeOut argument with dialog box

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Larry - 16 Jan 2005 08:37 GMT
I long time ago I asked if there was a way to have a dialog box close
automatically and there didn't seem to be any way to do it.  But
recently I heard from WordTips about the TimeOut argument which is like
this:

Dialogs(wdDialogToolsMacro).Show TimeOut:=1000

This displays the Macros dialog box for one second then dismisses it.
But then there is an error message that says:

Runtime error 4101 Illegal Function Call

Any idea why I'm getting the error?

This is with Word 97.

Thanks,
Larry
Larry - 16 Jan 2005 09:02 GMT
Also, I get a different response with different dialog boxes.

With the Macros dialog box, I get the error, as mentioned.  With the
Find dialog box, the TimeOut argument works correctly:  the box goes
away after one second and there's no error.  But with the Customize
dialog box, nothing happens, the box remains in view.

So, three different dialog boxes, three different behaviors.

Dialogs(wdDialogToolsMacro).Show TimeOut:=1000
Dialogs(wdDialogEditFind).Show TimeOut:=1000
Dialogs(wdDialogToolsCustomize).Show TimeOut:=1000

Larry

> I long time ago I asked if there was a way to have a dialog box close
> automatically and there didn't seem to be any way to do it.  But
[quoted text clipped - 14 lines]
> Thanks,
> Larry
Larry - 17 Jan 2005 00:28 GMT
I can get it to work using Resume Next

On Error Resume Next
Dialogs(wdDialogToolsMacro).Show TimeOut:=1000

But that seems like cheating.  :-)

Larry

> Also, I get a different response with different dialog boxes.
>
[quoted text clipped - 29 lines]
> > Thanks,
> > Larry

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.