View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bernard Liengme[_3_] Bernard Liengme[_3_] is offline
external usenet poster
 
Posts: 1,104
Default Is there a "ChangeCell" event?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myintersect As Range
Set myintersect = Application.Intersect(Target, Range("A1"))

If Not myintersect Is Nothing Then
If UCase(Target) = "MASTER" Then
MsgBox "Call the M subroutine"
ElseIf UCase(Target) = "BALANCE" Then
MsgBox "Call the B subroutine"
End If
End If
End Sub

Note that this must go onto a worksheet module - right click the sheet's tab
and select View Code. Change reference to A1 to suit your needs
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Rich" wrote in message
...
I have a pulldown list of values. I need to run a macro whenever the value
of the cell with the pulldown changes.

For example, If the cell is changed from "Master" to "Balance", I need a
macro to run to unhide certain sheets and hide others. The macro (vba
code)
is not the problem - it's just having excel execute the code if the cell
value changes.

Any help in pointing me in the right direction is appreciated!!