Copy code from ThisWorkbook using VBA?

  • Thread starter Thread starter RayportingMonkey
  • Start date Start date
R

RayportingMonkey

I have a master report template that I use, which loops through a series of
sites that I do reporting for and creates range/valued site level reports -
nice and small and easy to work with.

The requestor for this report wanted to know who is accessing these reports.
Right now, they are hosted on a Sharepoint site and statistics have not been
setup.

I have a simple routine that appends a log-file during the On Open event
that gives me the date, time, name of the file and user name.

However, this resides in the ThisWorkbook object and I don't know how to
programatically copy that code to each new workbook as they are created. I
need to get this code into each workbook so I can track who is using what
reports and when.

Grant it, I know that anyone who opens the workbook without macros enabled
won't be counted, but this is just for a rough baseline...

If any more information or snippets of code are required, let me know.

Thanks!
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top