Running Macros by selecting from a dropdown list
Put a validation cell in B9 and the put the wollowing in Worksheet code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("B9")) Is Nothing Then
Else
Call mymac
End If
End Sub
In a standard module put:
Sub mymac()
MsgBox ("mymac")
End Sub
--
Gary's Student
"FionaR" wrote:
I am trying to run a macro when I select a new value from a list (set up
using data validation). Is there a way of doing this. The idea is to clear
certain cell entries when I make a new selection on the data validation cell,
so if there is another way without using a macro, that would be fine too.
Is there a way to do this?
Fiona
|