Table of contents
Collapse the table of content
Expand the table of content

Invalid attribute in Sub, Function, or Property

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Some attributes are invalid within procedures. This error has the following cause and solution:

  • A Public or Private attribute appears within the body of a procedure definition. Remove the attribute from the procedure. To give thevariable widerscope, move the declaration to module level. Variables declared within procedures are always Private.

For additional information, select the item in question and press F1 (in Windows) or HELP (on the Macintosh).

© 2018 Microsoft