ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA Switching Between Macros (https://www.excelbanter.com/excel-discussion-misc-queries/53759-vba-switching-between-macros.html)

Jeff

VBA Switching Between Macros
 
Hi,

I have a lot of macros in my spreadsheet. And about 50% of the macros have
variables that are passed through them, so for example the macros look like
Macro1(x,y,z) rather then Macro1(). But usually to go to the code in a
macro I look up the macro in the list on the toolbar. Bur these macros don't
show up. Is there an easy way to go from one macro to the other's code. It
is getting to be a pain searching through the different "modules"

Thanks for your help

Bob Phillips

VBA Switching Between Macros
 
What exactly is the problem? You can't see them in the list, but if they
have parameters it presumably means that they are called from another macro,
and you can see them.



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jeff" wrote in message
...
Hi,

I have a lot of macros in my spreadsheet. And about 50% of the macros

have
variables that are passed through them, so for example the macros look

like
Macro1(x,y,z) rather then Macro1(). But usually to go to the code in a
macro I look up the macro in the list on the toolbar. Bur these macros

don't
show up. Is there an easy way to go from one macro to the other's code.

It
is getting to be a pain searching through the different "modules"

Thanks for your help




Dave Peterson

VBA Switching Between Macros
 
You had a couple of replies to yesterday's post--one showed how to pass parms to
known macro name.

But if you don't even know the name of the macro, then how would you ever know
what to pass to them?


Jeff wrote:

Hi,

I have a lot of macros in my spreadsheet. And about 50% of the macros have
variables that are passed through them, so for example the macros look like
Macro1(x,y,z) rather then Macro1(). But usually to go to the code in a
macro I look up the macro in the list on the toolbar. Bur these macros don't
show up. Is there an easy way to go from one macro to the other's code. It
is getting to be a pain searching through the different "modules"

Thanks for your help


--

Dave Peterson

Jeff

VBA Switching Between Macros
 


"Dave Peterson" wrote:

You had a couple of replies to yesterday's post--one showed how to pass parms to
known macro name.

But if you don't even know the name of the macro, then how would you ever know
what to pass to them?


Dave


There are a lot of macros. I know the name of the macro but it is called in
another macro. The question is how do I edit that called macro if it is not
in the module I am currently in. Is there some search function that lists
all the macros. It looks like I have to go to every module and search for
the called macro if I want to edit it. This seems to be very tedious.

Dave Peterson

VBA Switching Between Macros
 
If you know the project/workbook the macro is in, you can just search for that
name.

Inside the VBE
Edit|Find
make sure that you're searching "Current Project"

You may even want to search for:

Sub YourMacroName
or
Function YourFunctionName

to make sure you find it quicker.

If you're in the correct module, you can also use the dropdown at the top right
of the code window to see all the functions/subs that are in that module.



Jeff wrote:

"Dave Peterson" wrote:

You had a couple of replies to yesterday's post--one showed how to pass parms to
known macro name.

But if you don't even know the name of the macro, then how would you ever know
what to pass to them?


Dave


There are a lot of macros. I know the name of the macro but it is called in
another macro. The question is how do I edit that called macro if it is not
in the module I am currently in. Is there some search function that lists
all the macros. It looks like I have to go to every module and search for
the called macro if I want to edit it. This seems to be very tedious.


--

Dave Peterson


All times are GMT +1. The time now is 02:29 AM.

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