Auto Exec error w/o msgbox

Z

zSplash

I have an auto exec macro that runs great if I put a msgbox before it, but
just stops if I comment out the message box. What do you think I could
replace the msgbox with so that whatever "action" results from clicking the
msgbox is invisible to the user?

Here's the code:

Sub AutoExec()
MsgBox "doingAction"
WordBasic.disableAutoMacros 0
AddIns.Add FileName:="S:\F.dot", install:=True
GenMerge.genIt
End Sub

TIA
 
H

Helmut Weber

Hi zSplash,

my experience with some kinds of automacros is,
that they execute too fast, in a way.
Due to multitasking or asynchronous execution
or something the like.

Try:

Sub AutoExec()
Application.OnTime _
When:=Now + TimeValue("00:00:02"), _
Name:="continue"
End Sub

sub continue
' whatever
end sub

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 

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