Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create VB Code that executes upon no input of password!

Status
Not open for further replies.

Ninabunny

Programmer
Jul 24, 2000
70
US
I need to figure out how to create a vb code that executes if a password isn't input within a certain period of time. When it isn't input, files that are owned by me are deleted. These are personal files. Please help. I am not trying to write some insane virus....Jees...that is all I need. Just want to CYA at work.:)I
 
You need to explane abit more mate

is the password entry in your app?
if it is you could try somthing like this:

Private Sub Form_Load()
Timer1.Enabled = True
End Sub

Private Sub Command1_Click()
If Text1.Text = "MyPassword" Then
Timer1.Enabled = False
'Your Event You Want To Happen
Else
MsgBox "Please Try Again..."
End If
End Sub

Private Sub Timer1_Timer()
MsgBox "Now Deleting Files..."
Kill "C:\Temp\*.*"
End Sub

----------------------------------------------
Visual Source Programming
 
Does that mean I have to create password access to this database first then include the code? Sorry it is an access database and I need the code to destroy any of my personal files should I get let go. I am just covering my a** is all.
 
It isn't our task to judge the work ethics of others but, in this case, the question begs a comment.

If you are using your employer's equipment, the files aren't your to delete. They belong to your employer. Destruction of company property could create a criminal liability on your behalf.

Something to think about before you start coding booby-traps into your projects.
VCA.gif
 
Then the other option I guess would be to take all my personal files off then....thanks for the info....!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top