Macro inserting quotes "" in a cell
Hi Dave,
Why did you make this a "Public Sub AAA()"
rather than a "Sub AAA()" ?
Primarily because of a penchant for explicitness. If the scope of a sub is
not explicitly specified (as in your second example) it is Public by
default.
A public sub procedure is accessible to procedures in other modules;
conversely, when declared as Private, a sub is accessible only to procedures
in the same module
For more information, look at the Public, Private and Sub statements in VBA
help.
---
Regards,
Norman
|