Good Excel Practical Jokes, Pranks, Mean Tricks, etc.

Just thought of one:

Sub Workbook_Open()

Application.Visible = False

Dim wdApp as Word.Application

Set wdApp = New Word.Application

wdApp.Visible=True
Set wdApp = Nothing

Application.DisplayAlerts = False

Application.Quit

End Sub

Now every time they fire up XL, it will shut down, and open Word. :cool:

Not very hurtful, but definitely annoying.

Don't forget to add a reference to the Word Library.

_________________
I'm on my way to being a programmer! Well, I've at least bought the books. LOL
This message was edited by TommyGun on 2002-12-19 11:24
This message was edited by TommyGun on 2002-12-19 11:29
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Not sure how to do this (please help), but I get a lot of calls (amazingly) as people say their spreadhseets aren't working properly.

I go over and press "Scroll Lock" and hey presto it works. They are pretty dumb.

Is there a way I can put an auto open (in their personal.xls) to turn on scroll lock when opening xl?
 
Not an Excel trick but my level of lo-tech. On better keyboards the key covers snap off quite easily: When the victim is away from his desk, interchange the key caps on the number pad numbers "1-2-3" with the "7-8-9" key caps. Now it looks just like a telephone keypad...takes a long time to spot. :)
 
Howdy James,

Is there a way I can put an auto open (in their personal.xls) to turn on scroll lock when opening xl?

Well, placing it in their personal may be going a little far, but the following will toggle your scroll lock:<pre>
Private Type OSVERSIONINFO
dwOSVersionInfoSize As Long
dwMajorVersion As Long
dwMinorVersion As Long
dwBuildNumber As Long
dwPlatformId As Long
szCSDVersion As String * 128
End Type

Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" _
(lpVersionInformation As OSVERSIONINFO) As Long
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, _
ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function GetKeyboardState Lib "user32" _
(pbKeyState As Byte) As Long
Private Declare Function SetKeyboardState Lib "user32" _
(lppbKeyState As Byte) As Long

Const VK_SCROLL = &H91
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Const VER_PLATFORM_WIN32_NT = 2
Const VER_PLATFORM_WIN32_WINDOWS = 1


Sub Scroll()
Dim o As OSVERSIONINFO, keys(0 To 255) As Byte
o.dwOSVersionInfoSize = Len(o)
GetVersionEx o
GetKeyboardState keys(0)
If o.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS Then '=== Win95/98
keys(VK_SCROLL) = 1
SetKeyboardState keys(0)
ElseIf o.dwPlatformId = VER_PLATFORM_WIN32_NT Then '=== WinNT
keybd_event VK_SCROLL, &H45, KEYEVENTF_EXTENDEDKEY Or 0, 0
keybd_event VK_SCROLL, &H45, KEYEVENTF_EXTENDEDKEY _
Or KEYEVENTF_KEYUP, 0
End If
End Sub</pre>

Good hunting. :biggrin:
_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2003-01-06 20:39
 
I had a problem with my entire office suite a while back. It didn't matter which program I opened (excel, word, frontpage, etc), after about 5 seconds it just closed. I even tried uninstalling and reinstalling office, but it did not fix the problem. What a pain in the *** that was :)
 
How about this idea. Whenever a cell is selected, and 2 seconds has passed, the active cell becomes cell IV65536 :)
 
<pre>
Private Sub MrExcelMessageBoard_Activate(ByVal Zero_Replies As Topics)
Dim BrowsingTime As Time
Dim Topic As Object
BrowsingTime = Now
For Each Topic In Zero_Replies
Read Topic.MessageBody
Do Until The_Good_Idea.Found = True
Thinking
Loop
Reply
Next
MsgBox Now - BrowsingTime, vbQuestion, Title:="How long have you been here?"
End Sub
</pre>
 
LOL

Hey Colo write a program to post XL sheets to the board from Netscape.
naughty.gif
 
On 2003-01-09 10:29, TommyGun wrote:
LOL

Hey Colo write a program to post XL sheets to the board from Netscape.
naughty.gif

Hi Tommy,
Yea, that's great if I could hadle Netscape via XL. I have no idea with me now...
Could you teach me? LOL :biggrin:
 
Well if the master
bow.gif
can't do it then I sure as heck can't do it.

Oh well, I guess it was just wishful dreaming.
pmoonsleep.gif

This message was edited by TommyGun on 2003-01-10 08:28
 

Forum statistics

Threads
1,215,129
Messages
6,123,216
Members
449,091
Latest member
jeremy_bp001

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top