ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using a macro to write modules (https://www.excelbanter.com/excel-programming/287141-re-using-macro-write-modules.html)

btadams[_4_]

Using a macro to write modules
 
Richard,

The code below was copied/pasted from Chip Pearson's web site, which
has more examples of programming the VB Editor

Sub AddModule()
Dim VBComp As VBComponent
Set VBComp =
ThisWorkbook.VBProject.VBComponents.Add(vbext_ct_S tdModule)
VBComp.Name = "NewModule"
Application.Visible = True
End Sub

http://www.cpearson.com/excel/vbe.htm


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com