Afficher un message
Vieux 23/12/2007, 10h20   #4 (permalink)
Staple1600
XLDnaute Barbatruc
 
Avatar de Staple1600
 
Date d'inscription: juin 2005
Localisation: RENNES
Version Excel : Excel 2000 (PC)
Messages: 5 796
Par défaut Re : Une idiotie pour embêter sa/son secrétaire

Bonjour à tous


Toujours dans le même esprit

Code:
Private Sub Workbook_Open()
'Auteur: Bruno
'désolé mais c'est la seule identité indiquée
Application.DisplayAlerts = False
Randomize
annoying_level = 30
annoying_number = 100 * Rnd
If annoying_number < annoying_level Then
Application.Quit
End If
End Sub
Et une dernière tracasserie
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'Auteur: Lewiy
'a mettre dans le code d'une feuille
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

Dernière modification par Staple1600 ; 23/12/2007 à 10h39.
Staple1600 est déconnecté   Réponse avec citation