View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
CaOrAl CaOrAl is offline
external usenet poster
 
Posts: 6
Default ASSIG MACROS TO DROP DOWN LIST

Hello Bob,

Thank you for your answer. Sorry, but I quite not understand the
procedure..I have created the combobox as you state with all the months
(Jan to December) and have linked it to cell I2. When I select January
that cell shows the value "1" and december "12".

I have twelve Macros named from "January" to "December". Do I have to
create a new macro with the script you suggest below and instead of
.....Range("A1) i have to wirte ("I2")?

Thank you for your time!!!!!

Aisak


Bob Phillips ha escrit:
You could create a combobox from the forms toolbar, link it to a cell
(right-click it, Format ControlControl, and set the Cell link to a cell),
and then in the assigned macro, check that cell

Sub myMacro()
With Activesheet.Range("A1")
If .Value = "value 1" Then
Call macro1
ElseIf .Value = "value 1" Then
Call macro2
'etc.
End If
End Sub

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"CaOrAl" wrote in message
ups.com...
Hello and happy new year 2007 to you all,

I am working on a excel book for which I have created a series of
macros which will help me to short the info according to different
criteria, such as client name etc...

The idea is that the users can easily access the information they are
looking for. The next step is something I do not know how to go about.

I want to create a drop down list with, for instance, all the clients
and assign to each one its respective macros, in such a way that when
the user selects its client the corresponding macro will run.

I am fairly new to excel and know nothing about programming...could
somebody give me a hand or tell me if this is possible

Thank you in advance,

Aisak