Using macro code to change the name of a common spreadsheet when opened

  • Thread starter Thread starter AlanN
  • Start date Start date
A

AlanN

I have a spreadsheet, "my spreadsheet.xls", that is created through a process run daily and placed in a shared folder that about 10 people access on a regular basis. They do this by accessing the shortcut on their desktop. There is the high likelihood that one of those viewers will leave the spreadsheet open when another is trying to update the spreadsheet. Can anyone think of a way that when someone opens the spreadsheet from the link, that a process will kick off and rename the file just opened to something else so no process other than the one that updates the file will have access to it?

Does that make sense??

TIA, AlanN
 
Hi, AlanN,

Can the process that creates it also make a copy and
just let the viewers look at the copy? It won't do
any good to have the first viewer who opens the real file
rename it - what happens if they then keep it open for a
long time, blocking everyone else and the update process
too? Same boat. I'd try to start off with a copy
for them to get in.

jeff
-----Original Message-----
I have a spreadsheet, "my spreadsheet.xls", that is
created through a process run daily and placed in a
shared folder that about 10 people access on a regular
basis. They do this by accessing the shortcut on their
desktop. There is the high likelihood that one of those
viewers will leave the spreadsheet open when another is
trying to update the spreadsheet. Can anyone think of a
way that when someone opens the spreadsheet from the
link, that a process will kick off and rename the file
just opened to something else so no process other than
the one that updates the file will have access to it?
 
If you want the users to rename the file, it sounds like they're just referring
to the data--not making changes.

You could either mark the file ReadOnly (using windows explorer).

Or give the workbook a password that the user needs to enter before opening to
update.

File|SaveAs|Tools|General Options|Change the password to modify to something
memorable.
(xl2002 wording)

File|SaveAs|Options (in earlier versions)
 
Back
Top