Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gamez302
 
Posts: n/a
Default how can I protect workbook on a drive from deletion

I am trying to see if there is a way to protect a worksheet for being deleted
on a shared drive.
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

Put it on a shared drive where the users only have read access.


Gamez302 wrote:

I am trying to see if there is a way to protect a worksheet for being deleted
on a shared drive.


--

Dave Peterson
  #3   Report Post  
Gamez302
 
Posts: n/a
Default

I need my team to be able to add names in the worksheet. For the past couple
of days it has been deleted from our shared drive and all our data is lost.
I am wondering if we can put a password or anything to prevent this from
happening again.

"Dave Peterson" wrote:

Put it on a shared drive where the users only have read access.


Gamez302 wrote:

I am trying to see if there is a way to protect a worksheet for being deleted
on a shared drive.


--

Dave Peterson

  #4   Report Post  
Gord Dibben
 
Posts: n/a
Default

This cannot be done through Excel.

If running WindowsXP or any NT OS you can set folder and file permissions.

See OS Help on "permissions" and then select "File and Folder Permissions"

Also look up "user Accounts"


Gord Dibben Excel MVP

On Fri, 20 May 2005 11:56:01 -0700, "Gamez302"
wrote:

I need my team to be able to add names in the worksheet. For the past couple
of days it has been deleted from our shared drive and all our data is lost.
I am wondering if we can put a password or anything to prevent this from
happening again.

"Dave Peterson" wrote:

Put it on a shared drive where the users only have read access.


Gamez302 wrote:

I am trying to see if there is a way to protect a worksheet for being deleted
on a shared drive.


--

Dave Peterson


  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default

And more bad news. If you could prevent the deletion of the workbook, you'd
break the way excel works.

When excel saves the file, it saves it as a temporary file with a funny name (8
characters--no extension).

If the save is successful, xl will delete the original (or rename it to its
backup name (like "backup of book1.xlk)) and if that's successful, xl will
rename the funny named file to the original's name.

So I'm not sure you could ever accomplish what you want.

Maybe a work-around. You could create a backup copy of the workbook whenever
anyone saves the workbook. I'd use the date/time as part of the filename so
that I could keep track of the most current. And every so often, I'd go into
that backup folder and clean it up (manually).

Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)

Dim myFileName As String
Dim myFolderName As String

myFolderName = Me.Path & "\backup"

On Error Resume Next
MkDir myFolderName
On Error GoTo 0

myFileName = myFolderName & "\" & Left(Me.Name, Len(Me.Name) - 4) _
& "_" & Format(Now, "yyyymmdd_hhmmss") & ".xls"

ThisWorkbook.SaveCopyAs Filename:=myFileName

End Sub

This kind of code goes into the ThisWorkbook module.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Failing this kind of thing, I think the best thing to do is to make and keep
plenty of backups.

Gamez302 wrote:

I need my team to be able to add names in the worksheet. For the past couple
of days it has been deleted from our shared drive and all our data is lost.
I am wondering if we can put a password or anything to prevent this from
happening again.

"Dave Peterson" wrote:

Put it on a shared drive where the users only have read access.


Gamez302 wrote:

I am trying to see if there is a way to protect a worksheet for being deleted
on a shared drive.


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HOW DO I SUM TWO CELLS FROM ONE WORKBOOK TO ANOTHER WORKBOOK? Bill O'Neal Excel Worksheet Functions 8 August 14th 09 11:36 PM
Auto Protect workbook with password upon opening Brian Excel Worksheet Functions 0 February 23rd 05 05:45 PM
Unprotect Workbook Kent Excel Discussion (Misc queries) 1 February 4th 05 01:07 AM
protect a workbook from being deleted Toni's Taxi Excel Discussion (Misc queries) 1 January 12th 05 07:38 PM
Stubborn toolbars in Excel 007 Excel Discussion (Misc queries) 9 December 11th 04 02:02 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"