R
Richhall
Hi
I have a combo box with different months in. The user will select a
month then select a button to determine what report to run. I have 5
buttons for each month, so rather than have 60 buttons, I want to
select the Month, and then the user chooses the button. I then want
the button to use the month to determine the macro it should run.
I've done it so that the combo box sends a number to a cell (i.e Dec =
12) and then I use VLookup to return the month again in a different
cell (i,.e B13). I then have a number of Macros, i,e JanMacroA, Jan
MacroB, JanMacroN, and repeated for FebMacroA, etc for all the months
and thought maybe I could use the text value and put this in each
macro. i,e Run "B13"MacroA. Alternatively, all the Macros are the
same for each month, and just reference sheets etc. So if I could
create 5 single macros for each of the buttons, and use the combobox
value within the macro this would be great. For example this is one of
the simple macros:
Sheets("Jan 08").Visible = True
Selection.AutoFilter Field:=2, Criteria1:="Night"
So I want the Jan 08 to be whatever is in "B13" 08??
Can anyone help please?
Cheers
Rich
I have a combo box with different months in. The user will select a
month then select a button to determine what report to run. I have 5
buttons for each month, so rather than have 60 buttons, I want to
select the Month, and then the user chooses the button. I then want
the button to use the month to determine the macro it should run.
I've done it so that the combo box sends a number to a cell (i.e Dec =
12) and then I use VLookup to return the month again in a different
cell (i,.e B13). I then have a number of Macros, i,e JanMacroA, Jan
MacroB, JanMacroN, and repeated for FebMacroA, etc for all the months
and thought maybe I could use the text value and put this in each
macro. i,e Run "B13"MacroA. Alternatively, all the Macros are the
same for each month, and just reference sheets etc. So if I could
create 5 single macros for each of the buttons, and use the combobox
value within the macro this would be great. For example this is one of
the simple macros:
Sheets("Jan 08").Visible = True
Selection.AutoFilter Field:=2, Criteria1:="Night"
So I want the Jan 08 to be whatever is in "B13" 08??
Can anyone help please?
Cheers
Rich