• Sharebar

If there is one thing that goes together with programming its DISCO. This prank makes your Microsoft Word turn into a magical disco floor. The steps are very simple and this is all you have to do

Step 1: Open Word

Step 2: Press Alt F-11

Step 3: Copy code into your Normal Template. (replace any quotations, by re-typing them, I was too lazy to put in the ASCII versions)

Sub AutoExec()
Call RandomColor
End Sub
Sub RandomColor()

Dim x As Document
Set x = ActiveDocument

Application.OnTime When:=Now + TimeValue(“00:00:01″), _
Name:=”Disco”
End Sub

Sub Disco()
Dim x As Document
Set x = ActiveDocument
counter = CStr(Int((10 – 1 + 1) * Rnd + 1))
Select Case counter

Case 1
Colorpick = wdColorRed
Case 2
Colorpick = wdColorGreen
Case 3
Colorpick = wdColorYellow
Case 4
Colorpick = wdColorBlack
Case 5
Colorpick = wdColorPink
Case 6
Colorpick = wdColorBrown
Case 7
Colorpick = wdColorOrange
Case 8
Colorpick = wdColorPurple
Case 9
Colorpick = wdColorAqua
Case 10
Colorpick = wdColorAqua
End Select
x.Select
With Selection.Font
.Name = “Times New Roman”
.Size = 12
.Bold = True
.Color = Colorpick
.Animation = wdAnimationBlinkingBackground
End With
Selection.MoveRight Unit:=wdCharacter, Count:=1
Call RandomColor
End Sub

Step 4: Save

Step 5: Close Word

Step 6: Prank is on

  6 Responses to “Microsoft Disco”

  1. It didn’t work for me. I made sure to replace the quotations. I’m using Microsoft XP…I think from 2003.

  2. I’m having trouble with this one also, I replaced all of the quotes, but when I open word I receive a VB error
    “This command is not available because no doc is open”
    any help?

  3. Make sure you have an active document open. If you have nothing for it to change colors then well it does nothing

    I will update the code with an on error section

  4. it doesn’t work for me

  5. Doesn’t work for me either. Gives me a syntax error, highlighting the first step Sub RandomColor(). Help?

  6. you have compiled the file wrong. i went through this and found so many mistakes i almost killed my self. you have missed a lot of list seperators and strings.

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2011 Computer Pranks Central Suffusion theme by Sayontan Sinha