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: 59
Default adding a self destruct feature

I have a workbook on a network server and have distributed shortcuts to
several people. The workbook requires users to login in with unique usernames
and passwords so I can track who's used it. I recently added a 30 day
expiration that is reset by logging in with my username and password but I
would like to take this a step further.

The SelfDestruct Sub works fine if manually run and the Calc. event works
with a different output event (placing a value in a cell or something similar)
but not together.

any ideas on this?


cell D12 =IF(A1<C1,"yes","no")


Private Sub Worksheet_Calculate()
Worksheet_Change (ThisWorkbook.Sheets("Input").Range("d12"))
End Sub


Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
With ThisWorkbook.Sheets("Input")
If Target.Value < "" Then
If Target.Value = "yes" Then SelfDestruct
End If
End With
End Sub

Sub SelfDestruct()
Dim vbCom As Object

Set vbCom = Application.VBE.ActiveVBProject.VBComponents

vbCom.Remove VBComponent:= _
vbCom.Item("Module1")
vbCom.Item ("Module2")

End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200707/1

 
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
is this a bug or feature? Gary Keramidas Excel Programming 1 March 16th 06 04:36 AM
Yes / No Feature DCSwearingen Excel Worksheet Functions 1 August 5th 05 05:04 PM
macro for self destruct jwduthler Excel Programming 3 June 9th 05 03:16 PM
RTD Bug? or perhaps a feature? Another frustrated developer Excel Programming 6 March 4th 05 12:13 PM
How do I code a "self-destruct" triggered after a certain date? R Lee Excel Programming 2 September 27th 04 06:24 PM


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