Results 1 to 1 of 1

Worksheet Sucide Attack.

This is a discussion on Worksheet Sucide Attack. within the Microsoft Excel forums, part of the Courses category; Ay Dosto aaj main aap ko Excel ki file ko khatam yani sucide kerna sekatha hoo, hota yaoon hay kay ...

  1. #1
    iTT Student BlackJackPer's Avatar
    Join Date
    Apr 2011
    Location
    Pakistan
    Posts
    50

    Worksheet Sucide Attack.

    Ay Dosto aaj main aap ko Excel ki file ko khatam yani sucide kerna sekatha hoo, hota yaoon hay kay baz dafa hum chaty hain kay ya version zyda dair na use ho ya is file ko user is date tak hi use ker saky tu ay start kerty hain.

    Ms Excel open kerain.
    ALT+F11 press kerain ya sheet tab per right click kerain aur view code select kerain.
    left pain main this workbook per click kerain aur darj zail code paste ker dain

    Public Sub da()
    Dim Edate As Date
    Edate = Format("09/04/2013", "DD/MM/YYYY") ' Replace this with the date you want
    If Date > Edate Then
    MsgBox ("This worksheet is not a final version and valid upto " & Format(Edate, "dd-mmm-yyyy") & " it will be closed, or deleted automatically.")
    'ActiveWorkbook.Close
    Call CommintSuicide
    End If
    If Edate - Date < 30 Then
    MsgBox ("This worksheet expires on " & Format(Edate, "dd-mmm-yyyy") & " You have " & Edate - Date & " Days left ")
    End If
    End Sub

    Public Sub CommintSuicide()
    With ThisWorkbook
    Application.DisplayAlerts = False
    If .Path <> vbNullString Then
    .ChangeFileAccess xlReadOnly
    Kill .FullName
    End If
    ThisWorkbook.Close SaveChanges:=False
    End With
    End Sub

    ab declaration main ja kay workbook per click kerain aur darj zail code lekhain.

    Private Sub Workbook_Open()
    Call da ' function ko call bhee tu kerna hay jab hum workbook open kerain
    End Sub


    ab excel ki file ko save kerain aur open kerain yadd rahy kay macro security medium honi chay aur enable macro ko click kerain jab file open ho warna ya kaam nahi kery ga, ab jab aap workbook ko open kerain gay tu agar tu wahi date ho gi tu message ay ga

    "This workbook will expire on "09/04/2013" you have 0 date left"

    ab agar date purani ho gi tu workbook nahi kuly gi aur message ay ga kay

    "This worksheet is not a final version and valid upto 08/04/2013, it will be closed or deleted automatically"

    jasy hi ok per click kerain gay workbook delete ho jay gi.

    agar pasand ay tu comment zaroor dyna.

    duaoon ka talab gar...(Ask me anything about MS Office).
    .
    Attached Files Attached Files

Similar Threads

  1. Sucide GAME ???
    By //A//M//M//A//D// in forum Funmaza
    Replies: 37
    Last Post: 13th February 2010, 01:32 PM
  2. 1....2.........3..................Attack
    By ShOoTeR in forum Funmaza
    Replies: 72
    Last Post: 22nd January 2010, 12:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •