Jump to content

A little fun


jjd

Recommended Posts

Below is a section of code for an Excel application I wrote for work. This is part of my "security" for the application

 

Sub HelloNoddder()

 

Dim aWorksheet As Worksheet, aWorkbook As Workbook

 

'turn off screen updating

Application.ScreenUpdating = False

 

For i = 1 To 15

 

Set aWorkbook = ActiveWorkbook

Set aWorksheet = aWorkbook.Worksheets.Add(after:=aWorkbook.Sheets(aWorkbook.Sheets.Count))

 

'add a worksheet and populate it with "Hello Noddder!" in all cells

 

with aWorksheet

.Name = i

.Range("A1:IV65536") = "Hello Noddder!"

.Range("A1:IV65536").Font.Bold = True

end with

Cells.EntireColumn.AutoFit

 

Next i

 

Application.ScreenUpdating = True

'wait 3 seconds after the "noddder" box is closed and route the user to the Noddder thread

Application.OnTime Now + TimeSerial(0, 0, 3), "GetNoddderPage"

Message = MsgBox("What is the noddder?", vbQuestion)

 

 

End Sub

 

Sub GetNoddderPage()

 

ActiveWorkbook.FollowHyperlink Address:= _

"http://www.cascadeclimbers.com/threadz/showflat.php/Cat/0/Number/318511/page/0/view/collapsed/sb/5/o/all/fpart/1" _

, NewWindow:=False

 

End Sub

 

Any suggestions? I was thinking about setting all "non-noddder" sheets to "xlveryhidden" and perhaps freezing the window (obviously I don't want to do anything that will destroy the workbook, just a little prank for coworkers)

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

jjd in grad school we wrote a nice little macro that completely deleted then saved everything the person was working on the_finger.gif it was initiated by a happyface symbol smile.gif if that was pushed...boom everything was gone. we got a few people with it, but then started to feel sorry for the ones who couldn't figure out how to press save every now and then. cry.gif

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...