Sub & Function Message

A

adsinger00

I recenlty ran a virus scan on my hard drive and now everytime I open
word, open or close a word document, a message box comes up saying:
'Sub & Function not defined' I then click 'OK" and it goes away and the
program opens. When I go to close or reopen a document the same message
box appears.
How do I 'define' 'Sub & Function'? What is 'Sub & Function' ? How do
I get rid of this annoying message box?
thanks for the help
 
B

Beth Rosengard

I've never heard of this error before and don't have a clue what it means.
Someone else here should though, and the only reason I'm posting is to urge
you to post back with your OS and Word/Office version numbers so they know
how to advise you.

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/MacWordNew/index.htm>
(If using Safari, hit Refresh once or twice ­ or use another browser.)
Entourage Help Page: <http://www.entourage.mvps.org>
 
P

Paul Berkowitz

I recenlty ran a virus scan on my hard drive and now everytime I open
word, open or close a word document, a message box comes up saying:
'Sub & Function not defined' I then click 'OK" and it goes away and the
program opens. When I go to close or reopen a document the same message
box appears.
How do I 'define' 'Sub & Function'? What is 'Sub & Function' ? How do
I get rid of this annoying message box?
thanks for the help

You have a badly-formatted macro running at launch. Since it's badly
formatted it's missing the required Sub or Function name and so it errors.

First open your Normal template (in ~/Documents/Microsoft User Data) and see
if it's in there. If not, check for any template or file in
Applications/Microsoft Office 2004[X]/Office/Startup/Word/ folder. When
open go to Tools/Macros/Visual Basic Editor and see if any module is now
open. Unless you put a macro there yourself, just select and erase whatever
you find there, or, better, go to File/Remove Module1. (I suspect you might
find an AutoExec() macro that calls some other function that doesn't exist.
) Then Word/Close and Return to MS Word, then Save and Close the template.
If it's some file in the Startup/Word folder that you don't need, just trash
the file. If it's Normal, you've now cleaned it up.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

John McGhie [MVP - Word and Word Macintosh]

You had a virus, and the virus scanner cleaned it out.

Now, another component of the virus (which it didn't find...) is trying to
launch the virus. When it calls the virus, it's not there, which is what
produces the error.

"Sub" is a VBA statement that specifies the name of a subroutine.
"Function" is a VBA statement that specifies the name of a function (a piece
of code that returns a result when called).

Paul's quite correct: something is calling these components, but they have
been removed by the virus scanner. And I agree with him: the most likely
place to find them is in your Normal template. Try re-naming the Normal
template. If that fixes the problem, trash the old one: Word will create a
clean new one for you.

The other place it "could" be is in your Word Startup folder. Or in a
template pointed to by your Tools>Templates and Addins... Specification. In
the latter case, you need to look in that dialog box to see "What" it is,
then go looking in Finder to remove it. Removing it in the dialog is not
sufficient: it will attempt to put itself back in.

Cheers


I recenlty ran a virus scan on my hard drive and now everytime I open
word, open or close a word document, a message box comes up saying:
'Sub & Function not defined' I then click 'OK" and it goes away and the
program opens. When I go to close or reopen a document the same message
box appears.
How do I 'define' 'Sub & Function'? What is 'Sub & Function' ? How do
I get rid of this annoying message box?
thanks for the help

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 

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