Adding code in an Excel document via automation ? 
Author Message
 Adding code in an Excel document via automation ?

Well i'm working with excel's automation in my vb6 project.
I would like to know if it would be possible to add some code(like a macro)
at runtime in an excel document instead of using an excel model document
that contains the code?


Thu, 16 Jan 2003 03:00:00 GMT  
 Adding code in an Excel document via automation ?

Hi Dan,

We've done something similar by preparing a code module and exporting as a
text file.  We then use the syntax:

wbBook.VBProject.VBComponents.Import(sTempFile) from vb against an excel
object.

Obviously you can do whatever work your need to to this file dynamically
elsewhere in your code.

hope this helps

--
http://www.appfind.com/
the software development exchange


Quote:
> Well i'm working with excel's automation in my vb6 project.
> I would like to know if it would be possible to add some code(like a
macro)
> at runtime in an excel document instead of using an excel model document
> that contains the code?



Sat, 01 Mar 2003 07:18:23 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. adding office documents to a folder via code

2. Open Document via Excel vba coding

3. removing code from a document created via code and save as

4. ACCESS query to WORD document via Automation

5. Access-Excel Interoperability: Switching between two Application windows via automation (VBA)

6. Open, then Close Excel via Automation

7. launch & use excel via automation

8. Excel via automation

9. Excel Automation via .NET

10. MSHFlexGrid to Excel via Automation/OLE?

11. OLE Automation Contorl of Excel via Visual Basic

12. Excel sheets via automation

 

 
Powered by phpBB® Forum Software