I have a list of 27 macros and would like them in combo box

bestbackslays

New member
Joined
Sep 6, 2014
Messages
3
Reaction score
0
Points
0
Hi hope someone can help
I have a list of 27 macros in a spread sheet and would like them in a combo box or some type of drop down box.

Can anyone help
Thanks in advace
 

JeffreyWeir

Super Moderator
Staff member
Joined
Mar 22, 2011
Messages
357
Reaction score
0
Points
0
Location
New Zealand
Are you looking for a handy way to trigger macros? If so, use Alt + F8. Or do you want users to only trigger specific macros from the sheet (i.e. are there more than 27?)
 

WizzardOfOz

New member
Joined
Sep 4, 2013
Messages
184
Reaction score
0
Points
0
Location
Australia
Excel Version(s)
Office 365
I tried something similar before. I'm assuming any one writing 27 macro's knows their stuff so this is a guideline

on one sheet I had a descriptive name for each function (call it Mac1..Mac27)
I created a named range of this (Mymacros)
And then I hid the sheet from prying eyes

Then on the main sheet
Column A uses a data validation lookup to Mymacros
Column C (and others) contain the input parameters (e.g. width height etc) (If you need input parameters)

Then I created a module with a single UDF RunMyMacro that calls application.evaluate(macro(parameters)) and returns either true/false/result

Finally on the main sheet Column B =RunMyMacro(A1&"(" & C1 & "," & D1&")")

So change the data validation dropbox and/or input parameters and away it goes.
Just take note a UDF can only return values to itself so the macro will fail updating elsewhere

That worked well. then I tried getting cleverer by adding an OnChange event instead of a UDF so I can change values anywhere. Need to be very careful of infinite loops and volatile functions.....
 
Last edited:

bestbackslays

New member
Joined
Sep 6, 2014
Messages
3
Reaction score
0
Points
0
Hi not sure if you got my last message.
That looks around the thing lm looking for could l send you the file so you can look at it.
Regards
Dave
 

bestbackslays

New member
Joined
Sep 6, 2014
Messages
3
Reaction score
0
Points
0
Thanks for your reply
Could l send you the file to take a look at
Regards
Dave
 

WizzardOfOz

New member
Joined
Sep 4, 2013
Messages
184
Reaction score
0
Points
0
Location
Australia
Excel Version(s)
Office 365
yep new to this site so not sure if there is an in-mail box here somewhere, almost home time in Oz though
 
Top