A sure shot way of spreading some holiday cheer around the office is to send your colleagues regular excel workbooks/reports with a bit of mischievous vba code in it
Here’s my top 5 list:
1. Add a new menubar to excel. In my previous posts (Get each of your spreadsheets a customized menu), I talked about how to add custom menus to your excel workbook. Well……let’s say that with a few minor changes, you can ‘permanently’ add a menu which reads something like “I know what you did last summer”………Come to think of it, the world is open with a lot of possibilities :-))))). (After you’ve had your share of the fun, please be kind enough to send them the vba code that removes the menu)
2. If your boss asks for the results of the analysis that he requested, change the Workbook_Open function and insert a message box which reads…..”Dear Lord of the Universe, attached herewith are the results of the….”
3. Edit the Workbook_Open function so that a message box appears automatically after a few minutes (or seconds).
Dim t As Variant
t = Now()
If Now() < t + TimeValue("0:00:3") Then GoTo a:
MsgBox “Time’s up. You FAILED !!! “
Even folks with a fair idea of vba will not be able to catch this one right upfront !!!
4. Edit the Worksheet_Change function so that everytime the user enters something, the cursor jumps to a random cell.
5. This one is my personal favorite – Change the Workbook_Open function so that it keeps on displaying a never ending list of message boxes to the ‘victim’, each with a different message. You may be surprised as to how many times people are willing to click – just to be able to get to the end…..so keep the list long and ensure that you start with all the nice messages upfront and then gradually shift to the rude ones
Trick or treat !
(Image courtesy: Time Magazine and www.CDLI.ca)