Re: Win 2000 Word 2003 Compile error VB

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



If you are certain you checked the code then have you tried using
Detect and Repair? You can access it from the Help menu from any
Office application.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/

"BLeman" <BLeman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D5058E88-3F79-4499-83C9-7C8A3234B2FA@xxxxxxxxxxxxxxxx
I have checked and verified the references. The macro is stored in
the
Normal-New Macros (Code). When attempting to run the macro from
Word, the
Macro Compile error is displayed as previously noted. The screen
that is
displayed is titled Normal-BRL (Code) and contains garbage (mostly
special or
non printable characters). There is nothing intelligible on the
display.
The display is from the VB debugger which comes up next after
attempting to
"run" the macro from Word.

BLeman

"Beth Melton" wrote:

Since it was a copy/paste error then you really haven't pinpointed
the
line causing the error. When you encounter a Compile error that
means
the Compiler is attempting to translate/compile the code and the
procedure has not been executed. In that case the Sub <Name> will
be
highlighted in yellow indicating that line is currently in suspense
since it's not about to execute the macro. This unlike a Runtime
rror - for those you need to looks for the line highlighted in
yellow
which is the line that caused the error as the macro was running.
For
a compile error, look for the data that is selected (highlighted in
blue) in order to determine the cause of the error.

Did you check for missing references as I previously noted? Also,
is
the macro in a general module, such as NewMacros or is it stored
elsewhere?

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Office 2007 Preview Site:
http://www.microsoft.com/office/preview/default.mspx
Office 2007 Community Articles/Tutorials:
http://www.microsoft.com/office/preview/community/article_archive.mspx

TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/

"BLeman" <BLeman@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:9E8EF316-EF29-4ACB-86BF-10E0BE670863@xxxxxxxxxxxxxxxx
The code was OK, Just made an error when it was copied.

"BLeman" wrote:

The Error that is displayed is from Microsoft Visual Basic and
is
"Compile
Error: Expected: line number or label statement or end of
statement". The
actual line it stopped on is the first line: Sub BRL ().





.



Relevant Pages

  • Re: Win 2000 Word 2003 Compile error VB
    ... Microsoft Office MVP ... When attempting to run the macro from ... Macro Compile error is displayed as previously noted. ... The display is from the VB debugger which comes up next after ...
    (microsoft.public.word.application.errors)
  • Re: Win 2000 Word 2003 Compile error VB
    ... macro and a module with the same name. ... Microsoft Office MVP ... When you run the macro and you encounter a compile error in a ... The display is from the VB debugger which comes up next after ...
    (microsoft.public.word.application.errors)
  • Re: Win 2000 Word 2003 Compile error VB
    ... When you run the macro and you encounter a compile error in a module ... remove and reinstall of the Office system and also ran the Detect & ... Macro Compile error is displayed as previously noted. ... The display is from the VB debugger which comes up next after ...
    (microsoft.public.word.application.errors)
  • Re: Win 2000 Word 2003 Compile error VB
    ... tried to run it was loaded from one of the garbage modules. ... indicated the macro you recorded is stored in Normal-New Macros ... Macro Compile error is displayed as previously noted. ... The display is from the VB debugger which comes up next after ...
    (microsoft.public.word.application.errors)
  • Message Box Not Appearing and Field Updates Automatically
    ... Data}, linked to the macro {UpdatePrintNotice}, if there is a matching ... those that are checked, don't display. ... subrecord, I want the msg: "This individual does not have any Exam ...
    (comp.databases.ms-access)