Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.WindowState = xlNormal
Application.Width = Int(Rnd() * 1000) - 100
End Sub
Inspired by a forum question from yesterday:
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.WindowState = xlNormal Application.Width = Int(Rnd() * 1000) - 100 End Sub
Very basic, but funny watching people try to work with it!!
Inspired by a forum question from yesterday:
Code:Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.WindowState = xlNormal Application.Width = Int(Rnd() * 1000) - 100 End Sub
Very basic, but funny watching people try to work with it!!
Option Explicit
Dim i As Long
Dim j As Long
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Erik Van Geit
'070503
'screen will shrink each 'Req' times
Const Freq = 3
Const r = 0.75
i = i + 1
If i < Freq Then Exit Sub
i = 0
j = j + 1
With Application
If .WindowState = xlNormal Then
.Width = .Width - r
.Height = .Height - .Height / .Width * r
If j Mod 2 = 0 Then
.Top = .Top + r * 3
.Left = .Left + r * 1.75
End If
End If
End With
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim i As Integer
Application.WindowState = xlNormal
Application.Width = Int(Rnd() * 1000) - 100
i = Int(Rnd() * 4 + 1)
Select Case i
Case 1: Windows.Arrange xlCascade
Case 2: Windows.Arrange xlArrangeStyleTiled
Case 3: Windows.Arrange xlArrangeStyleHorizontal
Case 4: Windows.Arrange xlArrangeStyleVertical
End Select
End Sub
ActiveWindow.NewWindow
Public Declare Function WeirdSound Lib "Kernel32.dll" Alias "Beep" (ByVal lFrequency As Long, ByVal lDuration As Long) As Boolean
Sub TheHardDriveisDying()
WeirdSound 40, 10000
End Sub
VBA.Shell "Shutdown -f", vbHide