Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Use CreateObject to add a new module to Excel

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CreateObject - start Access from Excel Piers 2k Excel Programming 3 October 6th 06 03:50 PM
Createobject returns null in Excel [email protected] Excel Discussion (Misc queries) 1 March 27th 06 04:04 AM
Force particular Excel version loading with CreateObject? RB Smissaert Excel Programming 2 March 24th 06 09:32 AM
Excel CreateObject on server Dennis Redfield Excel Programming 9 July 15th 05 10:09 PM
Why can't create Excel.Application using CreateObject? [email protected] Excel Programming 0 May 6th 04 03:46 AM


All times are GMT +1. The time now is 11:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"