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/