I'm able to generate a random message for a given sheet, but am blanking out on narrowing the event down to a range within the sheet. Also the rnd function is returning two messages after the first time run. Tried to set the integer to zero to no avail. Following is the code I'm using. Any suggestions?
Teri
Good decisions come from Wisdom...
Wisdom comes from experience...
Experience comes from bad decisions
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim r As Integer
With Worksheets(2)
r = (3) * Rnd + 1
Cells(1, 1).Activate
If r = 1 Then
MsgBox "Thou shalt not type there!"
r = 0
End If
If r = 2 Then
MsgBox "You're typing privleges have been revoked."_
& Chr(10) & "Please seek Help!"
r = 0
End If
If r = 3 Then
MsgBox "Oh no you don't!"
r = 0
End If
End With
End Sub
Teri
Good decisions come from Wisdom...
Wisdom comes from experience...
Experience comes from bad decisions