Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Practical Jokes in Excel?
Hello -
What practical jokes have you played with Excel, either VBA or just built-in features? With all of the creativity on this Board, I figure there's got to be quite a few gems out there ... One of my coworkers thinks he knows it all, so I'd like to punk him ... my initial thought was a macro that would speak something (using text-to-speech) or play a sound when a specific key is pressed (say, the SHIFT or CTRL keys). I have absolutely no idea where to start with this ... thoughts? Looking forward to seeing what's been done before! //ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Practical Jokes in Excel?
Change the workbooks onopen event to change the windows time zone to India,
then all the users outlook appointments will be off 12 hours. "Ray" wrote: Hello - What practical jokes have you played with Excel, either VBA or just built-in features? With all of the creativity on this Board, I figure there's got to be quite a few gems out there ... One of my coworkers thinks he knows it all, so I'd like to punk him ... my initial thought was a macro that would speak something (using text-to-speech) or play a sound when a specific key is pressed (say, the SHIFT or CTRL keys). I have absolutely no idea where to start with this ... thoughts? Looking forward to seeing what's been done before! //ray . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Practical Jokes in Excel?
On Mar 2, 12:43*pm, Ray wrote:
Hello - What practical jokes have you played with Excel, either VBA or just built-in features? *With all of the creativity on this Board, I figure there's got to be quite a few gems out there ... One of my coworkers thinks he knows it all, so I'd like to punk him ... my initial thought was a macro that would speak something (using text-to-speech) or play a sound when a specific key is pressed (say, the SHIFT or CTRL keys). *I have absolutely no idea where to start with this ... thoughts? Looking forward to seeing what's been done before! //ray macro one of excel's easter eggs then assign it a common shortcut. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Practical Jokes in Excel?
This trick is benign but don't use it on your friend if he is prone to
panic. The sub is located in a worksheet rather than a module and the trigger is selection of cell C2 (event was an arbitrary choice on my part). There is a quick text to speech deployed to tell the user that selecting the cell was a bad thing. Then an hta file (HTML application file) is created in the temp folder and launched. This hta file doesn't do anything (no script) but it's designed to open maximized with no caption and no scroll bar. The effect of running the hta file is that the entire screen is filled with whatever the normal background color for windows is (white in most cases). The cursor will appear and can be moved but clicking the mouse or attempting to type does nothing. The escape is the 'Alt + F4' combination to close the active window and the user will be returned to the Excel sheet. A Windows savvy user may also use Ctrl + Alt + del to get the task list, locate mshta.exe and kill the process which has the same effect as Alt + F4. '________________________________ Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim strNotify As String strNotify = "Selecting this cell was a bad thing" If Target.Address = "$C$2" Then Application.EnableEvents = False Set objVoice = CreateObject("SAPI.SpVoice") objVoice.Speak strNotify Set fso = CreateObject("Scripting.FileSystemObject") strHTAname = fso.GetSpecialFolder(2) & "\Temp000.hta" Set txtHTA = fso.CreateTextFile(strHTAname) With txtHTA .WriteLine "<HTML" .WriteLine "<HTA:Application" .WriteLine "Caption=" & Chr(34) & "no" & Chr(34) .WriteLine "WindowState=" & Chr(34) & "Maximize" & Chr(34) .WriteLine "Scroll=" & Chr(34) & "no" & Chr(34) & "" .WriteLine "</HTML" End With Shell ("mshta.exe " & Chr(34) & strHTAname & Chr(34)) Set fso = Nothing Set objVoice = Nothing Application.EnableEvents = True End If End Sub '________________________________ "Ray" wrote in message ... Hello - What practical jokes have you played with Excel, either VBA or just built-in features? With all of the creativity on this Board, I figure there's got to be quite a few gems out there ... One of my coworkers thinks he knows it all, so I'd like to punk him ... my initial thought was a macro that would speak something (using text-to-speech) or play a sound when a specific key is pressed (say, the SHIFT or CTRL keys). I have absolutely no idea where to start with this ... thoughts? Looking forward to seeing what's been done before! //ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 practical book | Excel Discussion (Misc queries) | |||
Why can't I open any email jokes that friends send me with excel | New Users to Excel | |||
why is it a practical concept to use Excel functions by a person.. | Excel Worksheet Functions | |||
Practical use of Window Hide | Excel Programming | |||
Practical Excel Range Looping Project | Excel Programming |