ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Preventing Users From Locking a Shared Network Add-In File (https://www.excelbanter.com/excel-programming/334265-preventing-users-locking-shared-network-add-file.html)

jgeniti

Preventing Users From Locking a Shared Network Add-In File
 
Currently I have an Add-In with all of the code to an application that
I have about 30 users accessing randomly throughout the day. I have
password protected the code but the one major problem that I'm having
is that when I need to change the code the Add-In is usaully locked
because another user has accessed the file. Is there a way to prevent
users that are accessing the Add-In from being able to lock the file so
that I can't edit it?
Any help would be greatly appreciated.
Thank you,
James


keepITcool

Preventing Users From Locking a Shared Network Add-In File
 


in the addin' s workbook open event
include a line

If lcase(application.username) < "james geniti" then
thisworkbook.ChangeFileAccess xlReadOnly
end if




--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


JGeniti wrote :

Currently I have an Add-In with all of the code to an application that
I have about 30 users accessing randomly throughout the day. I have
password protected the code but the one major problem that I'm having
is that when I need to change the code the Add-In is usaully locked
because another user has accessed the file. Is there a way to prevent
users that are accessing the Add-In from being able to lock the file
so that I can't edit it?
Any help would be greatly appreciated.
Thank you,
James


jgeniti

Preventing Users From Locking a Shared Network Add-In File
 
Thanks, I'll try that.


Gareth[_6_]

Preventing Users From Locking a Shared Network Add-In File
 
Just to add to that, to avoid an error you might like to add to that

If lcase(application.username) < "james geniti" _
and not thisworkbook.readonly then
thisworkbook.ChangeFileAccess xlReadOnly
end if

JGeniti wrote:
Thanks, I'll try that.



All times are GMT +1. The time now is 10:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com