VBA to Notify When Somebody Opens an Excel File?

hellfire45

Active Member
Joined
Jun 7, 2014
Messages
447
So I am an analyst and I automate over 150 reports to people all over my company. I suspect that many people do not use the reports that I send and I would like to know which reports are not used so that I can turn them off.

Basically I am looking for VBA that will notify me, or maybe update a database someplace, when somebody opens an excel file. In this way, I can know which files are being used and which are not. Then if a file hasn't been opened by anybody in say 3 months, I can deactivate it.

Does anybody know of any good places to start on this? Maybe a VBA script that fires off when somebody opens a file. However, none of the files I distribute are macro enabled and it would be a tremendous effort to change them all. Still, I will take what I can get.

Please and thank you!
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
there is the conundrum, VBA deactivated and wanting a VBA Script (unless I mis understood) could the excel be ported to activedirectory/report server and have it tracked through use there
 

hellfire45

Active Member
Joined
Jun 7, 2014
Messages
447
there is the conundrum, VBA deactivated and wanting a VBA Script (unless I mis understood) could the excel be ported to activedirectory/report server and have it tracked through use there

If I were to distribute this as a macro enabled report, would it be possible?
 

mole999

Moderator
Joined
Oct 23, 2004
Messages
10,524
Office Version
  1. 2019
  2. 2016
  3. 2013
Platform
  1. Windows
I've never done a centralised excel, I use an on load, write to xlhidden sheet, so I think it would be possible to do something like that.

You will face the issue if the user has macros disabled then nothing happens (you can make the book not work if macros are disabled)
 

Watch MrExcel Video

Forum statistics

Threads
1,123,385
Messages
5,601,331
Members
414,446
Latest member
CRAVIN

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top