Alex,
Are you refering to a new VBA code module? If so, you don't use
CreateObject. Use code like the following:
ThisWorkbook.VBProject.VBComponents.Add ComponentType:=1
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
"Alex" wrote in message
...
How can I use the CreateObject method to create a new module in an Excel
file?
thanks
Alex