LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default limited usage

From another workbook, they could do

for each sh in Activeworkbook
sh.Visible = sh.xlSheetVisible
Next

so xlVeryHidden is barely better than just hiding the sheet for someone who
is willing to put in even a minimal amount of effort.

or

set rng = Activeworkbook.Names("Increment").RefersToRange
rng.Value = -1000000


Your misleading the OP in suggesting that he can limit use of his workbook.
If he is satisfied with using weak protection, then it probably isn't worth
the extra effort of using protection at all - obviously only my opinion

--
Regards,
Tom Ogilvy


"SteveM" wrote in message
ups.com...
One other thing. xlVeryHidden keeps the user away from the increment
value because he can't unhide the sheet using the Format - Sheets
menu. But Tom is right. An industrious user could get into your VB
code even if you password protect it. Although most end users are not
that knowledgeable.

If even novice users figure out your strategy though, they could just
make copies of the workbook and prior to the exhaustion of the use
number. You could perhaps get around that by using a date-time stamp
check instead of a count increment (i.e., let them use it for 2 weeks
after they open it the first time.) Full lockdown would require
something more sophisticated.

SteveM


SteveM wrote:
The easiest thing to do would be to place an increment count on a very
hidden worksheet. E.g. Name the increment cell "Increment" on a sheet
named "Hidden", and initialize the cell value to 0. Then add this code
to your Workbook Open sub

Private Sub Workbook_Open()
Dim incRange As Range
Set incRange = Range("Increment")

Sheets("hidden").Visible = xlVeryHidden
incRange = incRange + 1
Me.Save
If incRange 10 Then
Application.DisplayAlerts = False
MsgBox "over the use limit, contact owner"
Me.Close
End If

End Sub


jinvictor wrote:
how can use VB to design one program that only allow other people only
open the workbook 10 times, 11th time when he open the workbook the

msg
shows .

thanx


--
jinvictor


------------------------------------------------------------------------
jinvictor's Profile:

http://www.excelforum.com/member.php...o&userid=34099
View this thread:

http://www.excelforum.com/showthread...hreadid=553047





 
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
When IF has limited iterations Drew[_2_] Excel Discussion (Misc queries) 10 June 30th 08 07:42 AM
limited usage jinvictor Excel Discussion (Misc queries) 1 June 14th 06 04:28 PM
Excel Add In - Limited Use? sirin[_6_] Excel Programming 0 October 19th 04 06:59 AM
Excel Add In - Limited Use? sirin[_4_] Excel Programming 1 October 18th 04 01:16 PM
Excel Add In - Limited Use? sirin[_3_] Excel Programming 2 October 16th 04 01:06 PM


All times are GMT +1. The time now is 02:07 PM.

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"