Macros actioned by drop down list

  • Thread starter Thread starter Portuga
  • Start date Start date
P

Portuga

I have a drop down list in cell C1 list being validated from a list o
53 cells: A1:A53 (cell A1 being "week1" , cell A2 being "Week 2" etc)

I will record 53 macros (Macro "week1", etc).

1- Is it possible to assing the macro "Week 1" to cell A1 ?
(It is not a basic shape. Just a value in the cell.)

2- After assigning each macro to each cell, is it possible to start th
macros in Cell C1 by choosing from drop down list.?
( Example. in cell C1 I select "week25" and by doing this macr
"week25"starts running
 
Try this in the Sheet module

Private Sub Worksheet_Change(ByVal Target As Range)
' Only working in 2000-2003 wit a Data validation list
If Not Application.Intersect(Range("C1"), Target) Is Nothing Then
Application.Run Target.Value
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top