How To Dynamically Add and Run a VBA Macro from Visual Basic (219905)
The information in this article applies to:
- Microsoft Office Excel 2003
- Microsoft Excel 2000
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Office XP Developer
- Microsoft Office 2000 Developer
- Microsoft Excel 2002
- Microsoft Excel 97 for Windows
- Microsoft Office Professional Edition 2003
- Microsoft Office Standard Edition 2003
This article was previously published under Q219905 SUMMARY When Automating an Office product from Visual Basic, it may
be useful to move part of the code into a Microsoft Visual Basic for
Applications module that can run inside the process space of the server. This
can boost overall execution speed for your application and help alleviate
problems if the server only carries out an action when a call is made
in-process.
This article demonstrates how to dynamically add a
Microsoft Visual Basic for Applications module to a running Office application
from Visual Basic, and then call the macro to fill a worksheet in-process.
REFERENCES For more information on Automation of Office from Visual
Basic, please see the Office Development Support site at the following
address:
Modification Type: | Minor | Last Reviewed: | 8/23/2005 |
---|
Keywords: | kbAutomation kbhowto KB219905 kbAudDeveloper |
---|
|