Create a validation list in Cell A1 (you can change this address but you will
also have to change the code where it references "$A$1") by selecting Cell A1
- Data - Validation. Now change any value to List and add your names to the
list area provided (separated by commas or reference a range of cells with
the name listed). Right click on the sheet tab and select view code. The
VB
editor will open up. Paste the following code into the code window... That
should be it. You will need to modify the names and the call procedures to
match you list and your macros.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Select Case Target.Value
Case "Dave"
Call Module1.DaveProcedure
Case "Bob"
Call Module1.BobProcedure
Case "Tom"
Call Module1.TomProcedure
Case Else
MsgBox Target.Value & " Caused an error"
End Select
End If
End Sub
--
HTH...
Jim Thomlinson
"mgmcdevitt" wrote:
I have macros for each name already written. But I want to select a name
from a drop down list and have the designated macro run. And if I change
the name I want that designated macro to run.
Please explain how I can do this in as much detail as possible. I am
not very familar with macros.
Thanks for your help
--
mgmcdevitt
------------------------------------------------------------------------
mgmcdevitt's Profile: http://www.excelforum.com/member.php...o&userid=26592
View this thread: http://www.excelforum.com/showthread...hreadid=466940