# practical jokes on coworkers using VBA?



## jayd4wg (Nov 2, 2005)

I haven't seen one of these threads in a while...so what's your favorite prank?

Most of the people i have around here are pretty computer ILLiterate and the occasional random 1 in 10 offering of application.cursor=xlWait keeps them tied up for a good while.  

Don't post anything to get anyone fired...but put the cards on the table...what are YOUR funnies?


----------



## tactps (Nov 2, 2005)

The last post on page 8 of this:
http://www.mrexcel.com/board2/viewtopic.php?t=52989&postdays=0&postorder=asc&start=70
lists the 2 that amuse me most:

1. Replacing one number with another.
2. Fake messageboxes / speech.


Simple yet effective.

Use at own risk!


----------



## Tazguy37 (Nov 2, 2005)

Bruno came up with this one.  I love it!  


```
Private Sub Workbook_Open()
    Application.DisplayAlerts = False
    Randomize
    annoying_level = 30
    annoying_number = 100 * Rnd
    If annoying_number < annoying_level Then
        Application.Quit
    End If
End Sub
```


----------



## tactps (Nov 3, 2005)

That's just plain evil!!!!!

I love it too.


----------



## Tazguy37 (Nov 3, 2005)

Even worse if you make sure alerts are off.

Or, in ThisWorkbook:


```
Private Sub Workbook_Activate()
    ActiveWindow.WindowState = xlMinimized
End Sub
```

*muahahaha...*


----------



## litrelord (Nov 3, 2005)

Not really a practical joke as such but...

(Workbook module)


```
Private Sub Workbook_Open()
Application.OnKey "{F1}", "GetSomeRealHelp"
End Sub
```

(normal module)

```
Sub GetSomeRealHelp()
ActiveWorkbook.FollowHyperlink Address:="http://www.mrexcel.com/board2/search.php", _
    NewWindow:=True
End Sub
```

(Not that I doubt the usefulness of excel’s built in help but you have to be quite logical/technically minded to get what it’s saying most of the time.  At least here you get plain English and can ask questions.)

Nick


----------



## Tazguy37 (Nov 3, 2005)

litrelord said:
			
		

> Not really a practical joke as such but...
> 
> Nick



That's really cool!  Not a prank, but actually _helpful_!  Very nice.


----------



## erik.van.geit (Nov 4, 2005)

some more "Jokes and pranks""
made yesterday in a "normal" thread
but in fact it's better here 

```
Sub disney()
q = "uo yod la pxey tq l garf layrepuq"
    With Application
    For I = 5 To 0 Step -1
    mary = mary & poppins & .Substitute(.Substitute(.Substitute(StrReverse(Mid(q, I * 6 + 1, 6)), "q", "s"), "y", "c"), " ", "i")
    Next I
    End With
MsgBox IIf(Right(mary, poppins) = "s", marypoppins, Right(mary, Len(mary)) & "s"), 48, Left(mary, 5)
End Sub
```

and


----------



## GlennUK (Nov 10, 2005)

Don't even need VBA ... before starting up Excel, download the Klingon font :

http://www.kasper-online.de/en/docs/startrek/klingon.htm

and instal it. Start Excel. Do menu command Tools/Options/General and make the Standard font Klingon. Press OK. Close Excel.

Wait until the user opens an Excel document ..."Hey, I can't read my formulae in the formula bar ... it's all squiggles."

Heh heh heh heh heh.


----------



## Felix Atagong (Nov 10, 2005)

GlennUK said:
			
		

> Don't even need VBA ... before starting up Excel, download the Klingon font :
> Heh heh heh heh heh.



jIyajbe'


----------

