Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 238
Default Hoe to disable a workbook?

What can be done to disable a workbook? I have a protected workbook
named MyBook.xls. If someone copies it to MyBook1.xls, I want the copy
to be unusable. What kind of thing can be done?

One thing I was thinking was it could ask for a password if the
filename had changed or path changed. A password he would not have.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Hoe to disable a workbook?

Hi

You can use the below code which will not allow the user to work with; even
if the worksheet is moved/copied to another workbook. Please make sure to
password protect the VBA project.

Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveWorkbook.Name & ActiveSheet.Name < "MyBook1Sheet1" Then
MsgBox "You are not authorized"
Exit Sub
End If
End Sub


"Fan924" wrote:

What can be done to disable a workbook? I have a protected workbook
named MyBook.xls. If someone copies it to MyBook1.xls, I want the copy
to be unusable. What kind of thing can be done?

One thing I was thinking was it could ask for a password if the
filename had changed or path changed. A password he would not have.

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
disable workbook Roxy Excel Programming 3 October 17th 08 03:25 PM
Disable Pasting into a Workbook scottyboy Excel Worksheet Functions 2 May 9th 08 12:21 PM
disable closing of workbook Varun Nair Excel Programming 1 July 27th 06 01:50 PM
Disable cut paste in a workbook Narendra Nath Excel Programming 0 March 10th 06 01:42 PM
Disable a command from with in a workbook Tony Pizza Excel Programming 0 July 22nd 03 12:42 AM


All times are GMT +1. The time now is 09:39 AM.

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

About Us

"It's about Microsoft Excel"