XL2000: Sample Macros to Create a Module from an Existing Module, Named Range, or Text File (245801)
The information in this article applies to:
This article was previously published under Q245801 SUMMARY
You may want to programmatically insert stored Visual Basic for Applications (VBA) code into a new workbook that you create with the Workbooks.Add method. This may be necessary if you programmatically create new workbooks that you want to contain both data and macros.
This article describes automated methods that you can use to take VBA code that is stored in a module in another open workbook, a named range on a spreadsheet, or in a text file, and insert it into a new blank workbook.
REFERENCESFor more information about the objects in the Visual Basic Editor, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type vbe property in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbhowto KB245801 |
---|
|