Advertisement

01.05.2008 at 08:09AM PST, ID: 23060821
[x]
Attachment Details

How can I tell if Word has any open dialog boxes (eg File Open) using VBA / VB6?

Asked by PatternNut in Visual Basic Programming, Microsoft Word

Tags: VB6 / VBA

Hi Experts,

I'm working on an add-in for MS Word, writing in VBA / VB6.  However, if the user is in a dialog, eg Find/Replace or Print or File Open, I don't want the add-in to run.  How can I test whether there are any dialog boxes open?  If they are open, how can I tell which one it is?

I was thinking of something like this:

Dim objDial as word.dialog

for each objDial in word.dialogs
    'check if open
next objDial

However, that doesn't work because I don't think that there is a visible property.

Does anyone have any ideas?

Thanks in advance for you help,

PatternNut

Start Free Trial
[+][-]01.05.2008 at 10:55AM PST, ID: 20590146

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, Microsoft Word
Tags: VB6 / VBA
Sign Up Now!
Solution Provided By: Matti
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628