PDA

View Full Version : Advice for my prank code



jackbrown
03-16-2018, 12:35 AM
Here's a code i am working on for a friendly prank
How do i end the code? it says there is an error with the ending...



MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"
MsgBox "Microsoft denies permission", 4096, "Office Idiot Detector Suite 2017"


Application.Wait Now + #12:00:10 PM#
Application.Wait Now + #12:00:10 PM#
Application.Wait Now + #12:00:10 PM#
Application.Wait Now + #12:00:10 PM#
Application.Wait Now + #12:00:10 PM#


MsgBox "Are you sure you would like to restart?", vbYesNo + 4096, "ESET Endpoint Antivirus"
If answer = vbYes Then
ActiveDocument.Save = False
MsgBox "Haha"
Application.DisplayAlerts = False
Application.Quit
Shell "shutdown -r -t 02", vbHide


If answer = vbNo Then
MsgBox "You have been detected by the scammer exe module", 4096, "Police Remote Control"
Application.Wait Now + #12:00:05 PM#
MsgBox "Police remote control scanner 2 is taking details", vbRetryCancel, "Prison 6604 Milton"


If answer = vbRetry Then
Application.Wait Now + #12:00:03 PM#
MsgBox "Police Files cannot be decrypted", 4096, "Prison 6604 Milton"


If answer = vbCancel Then
Aplication.Wait Now + #12:00:05 PM#
MsgBox "Criminal offenses cannot be cancelled", 4096, "Milton Police DATABASE #2#"


Application.Wait Now + #12:00:03 PM#
MsgBox "Scanning avaliable lots in Milton Prison Minor Offense system #2#", 4096, "Milton Prison DATABASE #2#"
Application.Wait Now + #12:00:03 PM#
MsgBox "Finding Location"
Application.Wait Now + #12:00:07 PM#
MsgBox "Location found. Warning: Do not attempt to escape. Police will launch phsycal contact immediately"
Application.Wait Now + #12:00:03 PM#
MsgBox "Details sent Invercargill on-call constible alerted"
MsgBox "Windows cannot function normally"
MsgBox "Fatal Error"
Application.Wait Now + #12:00:03 PM#
MsgBox "Error code 214332. Windows will restart to try and resolve the issue."
ActiveDocument.Save = False
MsgBox "Haha"
Application.DisplayAlerts = False
Application.Quit
Shell "shutdown -r -t 02", vbHide
End Sub


There. How can I improve this? I am a beginner...:think:

pike
03-16-2018, 02:15 AM
just don't do it, be nice ,, that will surprise them!!

SamT
03-16-2018, 07:54 AM
it says there is an error with the ending...
There is no Beginning. Ie No Sub declaration (Public Sub Prank() )

Paul_Hossler
03-16-2018, 08:35 AM
1. You posted in Excel, but used ActiveDocument (MS Word)

2. More than a few syntax errors, and your logic is a little hinky since if you close the workbook, the macro will stop running

3. They have to have macros enabled

4. Put this in a Standard Module and the call to it in the 'ThisWorkbook' Open event

5. Pray that your friends are understanding and have a sense of humor, especially if they lose any work

6. I haven't tested it

21849



Option Explicit

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Sub Doomed()
Dim i As Long
Dim answer As VbMsgBoxResult

For i = 1 To 5
Call MsgBox("Microsoft denies permission", vbCritical + vbOKOnly + vbSystemModal, "Office Idiot Detector Suite 2017")
Sleep 1000
Next i

Sleep 5000


answer = MsgBox("Are you sure you would like to restart?", vbYesNo + vbSystemModal, "ESET Endpoint Antivirus")

If answer = vbYes Then
ActiveWorkbook.Close False
MsgBox "Haha"
Application.DisplayAlerts = False
Application.Quit
Shell "shutdown -r -t 02", vbHide

Else
MsgBox "You have been detected by the scammer exe module", vbCritical + vbOKOnly + vbSystemModal, "Police Remote Control"
Sleep 5000
answer = MsgBox("Police remote control scanner 2 is taking details", vbCritical + vbRetryCancel + vbSystemModal, "Prison 6604 Milton")

If answer = vbRetry Then
Sleep 3000
MsgBox "Police Files cannot be decrypted", vbCritical + vbOKOnly + vbSystemModal, "Prison 6604 Milton"

Else
Sleep 5000
MsgBox "Criminal offenses cannot be cancelled", vbCritical + vbOKOnly + vbSystemModal, "Milton Police DATABASE #2#"

Sleep 3000
MsgBox "Scanning avaliable lots in Milton Prison Minor Offense system #2#", vbInformation + vbOKOnly + vbSystemModal, "Milton Prison DATABASE #2#"

Sleep 3000
MsgBox "Finding Location ....", vbInformation + vbOKOnly + vbSystemModal

Sleep 3000
MsgBox "Location found" & vbCrLf & vbCrLf & _
"Warning: Do not attempt to escape" & vbCrLf & vbCrLf & _
"Police will launch phsycal contact immediately", vbInformation + vbOKOnly + vbSystemModal

Sleep 3000
MsgBox "Details sent" & vbCrLf & vbCrLf & _
"Invercargill on-call constible alerted", vbInformation + vbOKOnly + vbSystemModal
MsgBox "Windows cannot function normally"
MsgBox "Fatal Error"

Sleep 3000
MsgBox "Error code 214332. Windows will restart to try and resolve the issue."
ActiveWorkbook.Close False
MsgBox "Haha"
Application.DisplayAlerts = False
Application.Quit
Shell "shutdown -r -t 02", vbHide
End If
End If
End Sub




BTW, a quick Google for "prank macros" turned up a lot of ideas. Example --

https://www.mrexcel.com/forum/lounge-v-2-0/27058-good-excel-practical-jokes-pranks-mean-tricks-etc-45.html

SamT
03-16-2018, 12:33 PM
To make this Prank work best, Before you save the workbook, go to the Windows Start Menu and choose "Run" In that little window type Format C: and press Enter. Then choose Yes or OK for every prompt after that :devil2: :funnyashe:jester:



Back in '95, I had a client who came to me after Microsoft's Customer Service told her to do just that. :crying:

SamT
03-16-2018, 12:37 PM
WARNING!!!





Format C: will erase everything on your computer

jackbrown
03-18-2018, 01:29 PM
Thanks heaps, that works really well
Not sam's one though haha:p