Fun Times with Colleagues

BuffBuff Trusted RegularPosts: 275Registered
Have you ever wanted to annoy someone who you sit with, maybe just as a prank or a long term thing (which is very easy to do and to reverse)?

If they use Excel and leave a workbook open, right click on the sheetname on the tab at the bottom of the screen and click "View Code" (or alternatively you can hit Alt+F11

Copy the following code and paste it in the screen that comes up and then press the cross to close that screen.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Selection.Interior.ColorIndex = Int((56 * Rnd) + 1)
End Sub

Whenever a cell is selected anywhere on the sheet, it is filled with a random colour :-)

To remove it, view the code and delete it and press the cross to close the screen again.

It'll have them scratching their heads for ages!

:lol::lol::lol:

Comments

  • AdamRAdamR Experienced Mentor Posts: 668Registered
    Buff wrote: »
    Have you ever wanted to annoy someone who you sit with, maybe just as a prank or a long term thing (which is very easy to do and to reverse)?

    If they use Excel and leave a workbook open, right click on the sheetname on the tab at the bottom of the screen and click "View Code" (or alternatively you can hit Alt+F11

    Copy the following code and paste it in the screen that comes up and then press the cross to close that screen.
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Selection.Interior.ColorIndex = Int((56 * Rnd) + 1)
    End Sub
    

    Whenever a cell is selected anywhere on the sheet, it is filled with a random colour :-)

    To remove it, view the code and delete it and press the cross to close the screen again.

    It'll have them scratching their heads for ages!

    :lol::lol::lol:


    I like that!
  • Gem7321Gem7321 Experienced Mentor DevonPosts: 1,438MAAT, AAT Licensed Accountant
    Nice one! :001_smile:
  • AdamRAdamR Experienced Mentor Posts: 668Registered
    Are you snowed in, Gem? Looks pretty bad in Exeter according to BBC News! Or did it all somehow miss you?:lol:
  • Gem7321Gem7321 Experienced Mentor DevonPosts: 1,438MAAT, AAT Licensed Accountant
    All melted now, but it wasn't that bad to begin with. It's so unfair :( the last time we had snow it was crap as well, we had it bad for one day then it melted
  • AdamRAdamR Experienced Mentor Posts: 668Registered
    I was fed up of it by the 3rd day last time. Took two weeks for the last bit of ice to melt in my carpark. If it hadn't have rained, I think it would still be there!:laugh:

    It's laughable how we grind to a halt though - we could cope 40 years ago, we've had incredible advances in technology since then and yet we're going backwards!
  • AdamRAdamR Experienced Mentor Posts: 668Registered
    And before I get shouted at, I apologise for hijacking this thread!:blushing::lol:
  • BuffBuff Trusted Regular Posts: 275Registered
    Euro-gazillions

    blank
  • Gem7321Gem7321 Experienced Mentor DevonPosts: 1,438MAAT, AAT Licensed Accountant
    I love snow, we didn't even have time to build a snowman last time! :(

    Yeah sorry J... *does the angelic look*
  • Paul24Paul24 Experienced Mentor Posts: 578Registered
    AdamR wrote: »
    we could cope 40 years ago, we've had incredible advances in technology since then and yet we're going backwards!

    Thats part of the problem, werent so many cars about back then!
  • Gem7321Gem7321 Experienced Mentor DevonPosts: 1,438MAAT, AAT Licensed Accountant
  • Gem7321Gem7321 Experienced Mentor DevonPosts: 1,438MAAT, AAT Licensed Accountant
    Jamie I look like a knob now :ohmy:
  • BuffBuff Trusted Regular Posts: 275Registered
    only NOW?....

    ** heheh ** xx
  • AdamRAdamR Experienced Mentor Posts: 668Registered
    Paul24 wrote: »
    Thats part of the problem, werent so many cars about back then!

    Not just cars though. Go on You Tube and search "Snow (1963)", you'll see what I mean.
  • mark130273mark130273 Font Of All Knowledge Posts: 4,234Registered
    Buff , that is evil..................but will it work on lotus ?
  • BuffBuff Trusted Regular Posts: 275Registered
    Mark,

    I don't think it will - VBA is a Microsoft built in editing language, which I am not sure if Lotus can use - if it can I'm not sure how to get to the code input screen (I guess you could try the same hot key Alt+F11 and see if that brings it up)

    I only really work with excel VBA so I couldn't comment on if it would work / delete data etc on other platforms.
  • mark130273mark130273 Font Of All Knowledge Posts: 4,234Registered
    ok thanks anyway.have to go to my old works and put it on there comp....now that would be so funny !!
Sign In or Register to comment.