98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » VBA
VBA
Resolved · Low Priority · Version 2003
Elaine has attended:
Excel VBA Intro Intermediate course
VBA
When creating code in one workbook how do you make it available to other workbooks?
Make Code Available
Hi Elaine
If code is written in the Personal Macro Workbook it can be used by all workbooks that are opened on your computer.
Also, if Procedures(Macros) created in any workbook are preceded by the word Public (eg Public Sub MyMacro() ) then they will be visible by all open workbooks.
The danger of writing code in one workbook (Book A) to be used in another workbook (Book B), is that Book A has to be open on the computer for Book B to be able to use the code.
This means that if Book B is sent to someone else they can't run any of the code.
As a good practice I always advise people to copy the code into all the workbooks that will be using it.
It may be duplication of code but will save hours of frustration in the long term.
Regards
Carlos
Training information:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Moving between Worksheets without using the mouseUse the 'Ctrl+PgDn' and 'Ctrl+PgUp' keys. |