Found this on my internet travels - should get you startedOn 2002-11-06 05:39, Sourdust wrote:
It's maybe my evil mind but I like this idea. I once set up a user on a Novell network to have to change their password daily and the password had to have at least 40 characters. I pleaded ignorance for about a week before owning up! I like the idea of various messages popping up when a certain cell is selected. Can anybody help me with the code for that , I'm just starting to learn VBA.
Thanks for the laughs.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
' The variable KeyCells contains the cells that will
' cause an alert when they are changed.
Set KeyCells = Range("A1:C10")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
' Display a message when one of the designated cells has been
' changed.
' Place your code here.
MsgBox "Cell " & Target.Address & " has changed."
End If
End Sub


2Likes
LinkBack URL
About LinkBacks



Reply With Quote



Bookmarks