LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Programatically Enable VBIDE Reference?

First off, let me say that I never use my "power" for evil... Only for good!

Now, with that out of the way...

I have a script that creates a series of new workbooks and copies certain
data into them. I need to track who is using these reports, but they are
distributed on a SharePoint where statistics have not been enabled.

So, I have written a simple OnOpen script that appends a log with date,
time, ThisWorkook.Name and Application.UserName. Grant it, if the user does
not enable macros I don't get the data anyway, but this is a pilot and we
just need a good idea of who is using them.

Anyway, I have another routine that copies the necessary code into the
ThisWorkbook object, but in order for it to execute, I need to enable a
reference to "Microsoft Visual Basic For Applications Extensibility 5.3" on
the new workbook.

I can make everything else run automatically, but for each new workbook, it
seems I would have to manually set this reference, which defeats my purpose...

Is there a way to programatically enable a reference to "Microsoft Visual
Basic For Applications Extensibility 5.3"?

Is there a different/better method of setting up both a private sub and an
OnOpen event in a new workbook?

Any enlightenment would help me in this dark place!

Regards,
Ray

--
"Trying to make reports so easy... even a monkey could run ''em!"
 
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
vbide greg Excel Programming 1 April 11th 07 09:10 PM
programatically reference controls on spreadsheet k2sarah Excel Programming 2 October 31st 06 01:57 PM
Adding a reference programatically Fred Excel Programming 10 April 29th 06 12:55 AM
Programatically Unlocking a Project in the VBIDE Jim Thomlinson[_5_] Excel Programming 2 January 5th 06 10:07 PM
can the VBIDE have its own macros? emily Excel Programming 1 August 14th 03 05:27 AM


All times are GMT +1. The time now is 01:25 PM.

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"