View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
btadams[_4_] btadams[_4_] is offline
external usenet poster
 
Posts: 1
Default 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/