Ensure certain file is used?

TheWennerWoman

Active Member
Joined
Aug 1, 2019
Messages
270
Office Version
  1. 365
Platform
  1. Windows
Hello, this is a corporate environment and we have a number of macro-driven files on a Sharepoint site.

I need to ensure that the end-user is downloading one of these files each and every time they want to use it (a health claim form, for example)......what I don't want them doing is saving down a file on their desktop and re-using it.

Is there a way of getting Excel to detect if this has happened?

I thought something like having the original file with a flag somewhere of 0; when the user opens it, the flag changes to 1. If they then attempt to subsequently reuse the file, I can have some code detect the 1 and say "can't use this file, download a fresh copy from Sharepoint". Except these forms need to be approved by line managers so if the line manager opens the form, the flag will be 1 and the error message triggered (which isn't what I want in those cases).

Any thoughts appreciated.

Thanks for reading.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
These "files" are workbooks? Then I would try examining the workbook path to ensure it begins with your SP server path. But where are managers opening them from? If not from SP then your code would need to include a test for mgr name. However, if you hard code those names, that would require re-design every time a name changes. If you hide a sheet of mgr names and use that instead, you'd need to protect that from viewing/editing as well. Also, if you can code any solution anyone can edit code unless you password protect the vba project. In that case, you better not forget the password.

In the end, if I was one of these users who are too lazy to do the right thing, the protection you install may not need to be bullet proof, but just enough to make it not worth my while.
 
Upvote 0
These "files" are workbooks? Then I would try examining the workbook path to ensure it begins with your SP server path. But where are managers opening them from? If not from SP then your code would need to include a test for mgr name. However, if you hard code those names, that would require re-design every time a name changes. If you hide a sheet of mgr names and use that instead, you'd need to protect that from viewing/editing as well. Also, if you can code any solution anyone can edit code unless you password protect the vba project. In that case, you better not forget the password.

In the end, if I was one of these users who are too lazy to do the right thing, the protection you install may not need to be bullet proof, but just enough to make it not worth my while.
Yes they are workbooks.

How it *should* work is the user downloads a fresh copy from Sharepoint, completes it, forwards it to his/her line manager for authorisation who then attaches it to an email with a yes/no response.

So it's messy.
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,876
Members
449,056
Latest member
ruhulaminappu

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
Back
Top