![]() |
Running Macros by selecting from a dropdown list
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 |
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 |
Running Macros by selecting from a dropdown list
Thank you very much.
Fiona "Gary''s Student" wrote: 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 |
Running Macros by selecting from a dropdown list
You are very welcome!
-- Gary's Student "FionaR" wrote: Thank you very much. Fiona "Gary''s Student" wrote: 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 |
All times are GMT +1. The time now is 03:01 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com