ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   run multiple macros from a drop down menu (https://www.excelbanter.com/excel-programming/435199-run-multiple-macros-drop-down-menu.html)

jlcoop01

run multiple macros from a drop down menu
 
I am creating an invoice type template and have address macros of the
locations we consistently service. I am needing assistance in getting them
to run from a drop down box. Any help you can offer will be greatly
appreciated.

Souny

run multiple macros from a drop down menu
 
jlcoop01,

You could use the code something like:

Select Case Activeworksheet.OLEObjects("NameOfTheDropDown").ob ject.value
Case "FirstValuefromDropDown"
'execute the following code
Case "SecondValuefromDropDown"
'execute the following code
Case "ThirdValuefromDropDown"
'execute the following code
End Select

I hope that helps.

"jlcoop01" wrote:

I am creating an invoice type template and have address macros of the
locations we consistently service. I am needing assistance in getting them
to run from a drop down box. Any help you can offer will be greatly
appreciated.


joel[_41_]

run multiple macros from a drop down menu
 

A drop down box will move the selected range away from the cell you have
selected. there are a few options to try


1) Add a control button on the worksheet. Select the macro you want to
run from the droop down box. Then select the cell you want to use and
push the control button

2) Add an Inputbox to you code to select the cell location during the
execution of the macro.

3) Use a Listbox instead of the dropdown box to select the macro.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=146111


jlcoop01

run multiple macros from a drop down menu
 
Souny,

Thank you for your response. I have tried this code with no luck. Does it
make a difference that the address macros are in my personal macros workbook?

Jodie

"Souny" wrote:

jlcoop01,

You could use the code something like:

Select Case Activeworksheet.OLEObjects("NameOfTheDropDown").ob ject.value
Case "FirstValuefromDropDown"
'execute the following code
Case "SecondValuefromDropDown"
'execute the following code
Case "ThirdValuefromDropDown"
'execute the following code
End Select

I hope that helps.

"jlcoop01" wrote:

I am creating an invoice type template and have address macros of the
locations we consistently service. I am needing assistance in getting them
to run from a drop down box. Any help you can offer will be greatly
appreciated.


joel[_72_]

run multiple macros from a drop down menu
 

If you are using event macros then they have to be in the workbook that
is producing the event, not in the personal workbook. If the macro
isn't an event macro then you have to make sure your macros don't move
the fouc from the active sheet for this code to work.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=146111


jlcoop01

run multiple macros from a drop down menu
 
Joel,

Do you have any suggestions? I have the macro for the invoice working fine.
I was trying to make it easier to insert the location information where work
was performed. Thanks for your help!

Jodie

"joel" wrote:


If you are using event macros then they have to be in the workbook that
is producing the event, not in the personal workbook. If the macro
isn't an event macro then you have to make sure your macros don't move
the fouc from the active sheet for this code to work.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=146111

.


joel[_76_]

run multiple macros from a drop down menu
 

there isn't enough information here to answer your question. Remmber we
have never seen you workbook and cannot read your mind. You are asking
a perfrect strange a question and must provide enough details to give a
great answer.


--
joel
------------------------------------------------------------------------
joel's Profile: http://www.thecodecage.com/forumz/member.php?userid=229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=146111



All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com