LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Coding deletion

Currently I have a vba code that will eliminate the page after it has been
opened a number of times. For instacne if the code is set to 3, after the 3rd
time the sheet is opened it will lock the user out permanently. However, if
they should to select disable macros, they can access the sheet. How can you
lock them out permanently. below is the code I am using.

Private Sub Workbook_Open()
Dim OpenCount As Integer
OpenCount = GetSetting("MyApp", "Count", "OpenCount", 0)

SaveSetting "MyApp", "Count", "OpenCount", OpenCount + 1

If OpenCount = 3 Then ThisWorkbook.Close SaveChanges:=False

End Sub



 
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
Row Deletion SiH23 Excel Programming 1 February 27th 09 07:04 PM
name deletion rk0909 Excel Discussion (Misc queries) 2 January 4th 08 11:03 PM
dup value deletion italiavb Excel Programming 0 February 6th 07 01:14 AM
"=ROW()-1" type of coding doesn't appear in a filter / is there coding that does? StargateFan[_3_] Excel Programming 10 October 6th 05 01:18 PM
Implant macro coding into ASP coding Sam yong Excel Programming 5 September 15th 05 10:37 AM


All times are GMT +1. The time now is 01:18 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"