Thread
:
Worksheet Change Event
View Single Post
#
4
Posted to microsoft.public.excel.misc
Don Guillett
external usenet poster
Posts: 10,124
Worksheet Change Event
Test this. I don't know what MLV_wildcard_cell refers to. Send your wb to my
address below along with instructions and a snippet of this message.
This assume that if you change A1 then MLV_wildcard_cell. Again, NO idea
what that refers to.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1") Then MLV_wildcard_cell
If Target.Address = Range("e1") Then ERM_wildcard_cell
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Tony S." wrote in message
...
Hi Don... thanks for your prompt respose. I'm kinda new at programming so
I
could use a little more guidance if you please.
Here is my revised code: I get an "End If without block If" error
Private Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCells As Range
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
If Target.Address = Range("a1") Then MLV_wildcard_cell
End If
If Target.Address = Range("e1") Then ERM_wildcard_cell
End If
End Sub
I'm sure you can immediately see what is wrong, but I don't have a clue.
Tony
"Don Guillett" wrote:
Sure, something like
Private Sub Worksheet_Change(ByVal Target As Range)
if target.address=range("a1") then msgbox "a1")
if target.address=range("e1") then msgbox "e1")
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Tony S." wrote in message
...
I thare any way to execute more than one worksheet change per worksheet;
say
for cells "A1" and "E1"?
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") 'another code for cell E1??
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.
End If
End Sub
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett