Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Use Combo Box value to determine macro used

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 41
Default Use Combo Box value to determine macro used

In addition, I have also used the B13 value to add into another field
and create the names I need:

i.e

B13 ComboBox Selection e.g. Jan
B14 08
B15 =B13&B14 e.g. Jan 08

So basically just need to know how to use this value as text in a
macro.

Cheers

Rich

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to be used with Combo box kd Excel Worksheet Functions 1 November 19th 07 08:33 AM
20 different numbers want excel to determine which combo add to x OCDN-IT Excel Discussion (Misc queries) 2 October 18th 07 10:26 PM
Combo Box and Macro flow23 Excel Discussion (Misc queries) 0 July 3rd 07 02:50 PM
How to determine within a macro if a cell contains a hyperlink. Richard L. Miga Excel Discussion (Misc queries) 4 May 8th 07 12:32 PM
macro to compare multiple cells to determine value macrodummy Excel Worksheet Functions 2 October 9th 05 01:21 PM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"