PDA

View Full Version : How to Add References in Excel Dynamically?



go4rinkesh
02-26-2008, 11:59 AM
HI friends!

I have couple of query regarding Excel.please help me to solve it.

First is that i want to add "MICROSOFT SCRIPT RUNTIME" (Reference object) in my sheet so that i can use filesystem object.I can manually ad it through the folllowing way:

in VBE->Tools|References|MIcrosoft Script Runtime

But i want to add this through coding when my workbook opens.How can i do for this.

Second Query is that can we know that the particular excel file is opened for first time or not? Means i want to do some works if the excel file is opened for the first time like any other software which requires Registration info when it is running first time? Is it Possible? if Yes How it can be done?

Thnx.

go4rinkesh

mdmackillop
02-26-2008, 12:53 PM
Q1: Have a look at this KB Item (http://vbaexpress.com/kb/getarticle.php?kb_id=267)