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
0
Jeff1 (635)
11/4/2005 5:15:12 PM
excel.misc 78881 articles. 5 followers. Follow

4 Replies
285 Views

Similar Articles

[PageSpeed] 17

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" <Jeff@discussions.microsoft.com> wrote in message
news:56CB3B59-E9FB-47C8-8E0C-BF42EC4E3353@microsoft.com...
> 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


0
bob.phillips1 (6510)
11/4/2005 5:45:31 PM
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
0
petersod (12005)
11/4/2005 5:46:51 PM

"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.
0
Jeff1 (635)
11/4/2005 6:11:04 PM
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
0
petersod (12005)
11/5/2005 12:45:53 AM
Reply:

Similar Artilces:

Creating a print-macro that'll only print page 1?
Hi, I have a spreadsheet that contains multiple sheets. I want to add a button that runs a macro, which only prints page 1 on the first sheet (called Scorekort). The "Scorekort" sheet contains 13 pages in total, but I only want to print the first page. Any ideas for this macro? Anders hi, Sub Macro1() Sheets("Scorekort").PrintOut From:=1, To:=1, Copies:=1, Preview:=True, Collate:=True End Sub if you don't want a print preview, Preview:=False -- isabelle Le 2011-05-21 04:16, Anders M a �crit : > Hi, > > I have a spreadsheet that contains multiple ...

Excel VBA #4
I'm very new to VBA and could use a little help. I wrote a macro that does the following: First Part: Unprotects the sheet; then does a file Save As to a specific folder and then goes to Cell P2. All is fine except the macro didn't record the password and I have to type it in everytime. So it's prompting me for the password everytime. During the file Save As operating, it says such & such file already exists, do you want to replace? The answer is always going to be YES. How do i make that happen? Second Part: Once Cell P2 is activated, I type in a code (number) for that...

VBA Code not shown
I have a Excel File containing VBA macros. But when i want to view the VBA code by going to the does not ask for password as it is expected for a Password Protected Project. Else, it says, project is unviewable. Why is that? Is this something else except a VBA Excel File? How can i see the code? Thanks in Advance. Is the workbook shared? What version excel created the workbook? What version of excel are you using to try to open the project? Subodh wrote: > > I have a Excel File containing VBA macros. > But when i want to view the VBA code by going to the does not a...

get rid of macro option at startup
I created and then deleted a macro in an Excel file. Why do I still get the warning box (i.e. the one asking if I want to enable or disable macros) when I open the file? Is there a way to get rid of this since I no longer have macros in this file? Thanks. Brad You need to delete the empty module.! Bill K "Brad Rench" <brench@comcast.net> wrote in message news:kSOdnb0Jjst9afaiXTWJkg@comcast.com... > I created and then deleted a macro in an Excel file. > > Why do I still get the warning box (i.e. the one asking if I want to enable > or disable macros) when I o...

Macro's with Ctrl or Ctrl-Shift?
When you record a new macro it asks you what Ctrl key you want to access it with. If you Edit the Properties of a Macro it asks you what Ctrl-Shift key you want to use to access a macro. How can you have more control over this to assign the proper key to a macro? Thanks. Al, I don't know what you mean by "edit the properties of a macro." You can assign a Ctrl or Ctrl-Shift combination (excluding number keys) to macros either when about to record a macro, or later with Tools - Macro - Macros - Options. If by "have more control," you mean keys other than C...

SOAP Call from VBA?
Can anyone point me to some good examples online of how to make a SOAP call from VBA in access? I am using Access 2003 and would like to be able to submit an XML file via a SOAP call and get the result message back. You can find the web services add-in for access 2003 here: http://www.microsoft.com/downloads/details.aspx?familyid=FA36018A-E1CF-48A3-9B35-169D819ECF18&displaylang=en In many cases, you find it better off to use the msXML library in place of the soap add-in. It a lot less code try: Public Sub GetQuote2() Dim objXML As Object Di...

Somehow I created a Macro in a worksheet.
I created a macro in an Excel worksheet somehow. I didn't try to, it just happened. Now everytime I open that workbook, it asks me if I want to run the macro, disable it, etc. How the hell do I get rid of the macro? It doesn't show up under tools, macros. And it apparently doesn't do anything either because I can disable it and nothing different happens. Who invented this system anyway? Thanks, V When you record a macro, a module is created to store the macro code. There are instructions here for removing the module that is causing the prompt to appear: http://www.c...

macro problem
i have a worksheet that shows worktimes for employees, the cells ar grey, when you enter the employees time or "shift" and press a butto that executes my macro, it changes the colour of the "shift" to whit to show the time scale that the employee is working. the macro run fine, the problem is that to run the macro i have to click a button. i there a way of running the macro, or executing the code when i ente the employees "shift" of time. or is this not possible? this is the code i am using at the minute for it to run when i click o a button: Private Function Sh...

macro command
Hi all i had a problem of shifting selected rows one cell to the right, the data looks like this:- 328 Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 509 Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 ALEX Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 ALJ Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 ANCH Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 ANG Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 ANSON Sales $ 0 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 BEDOK Sales $ 0 0 0 0 0 Qnty 0 0 0 0 0 0 0 As what you have see the qnty column is not same as the sales column and i had hundred thousand of rows to cut and paste. ...

Solver add-in and macros
I just got a new computer with XP and Excel 2003 and tried to run a macro that used to SOLVER add-in function and got a compile error. As a test I recorded a macro using the SOLVER and got the same result when I tried to run that macro. The Compile Error is "Sub or Function not defined". On the Knowledge Base it says I need to add SOLVER to the list of References in the VB Editor. When I go to the references list, SOLVER does not appear. When I open Help for VB and search for SOLVER, it finds nothing. What is going on? Why doesn't VB even recognize the existence ...

Excel / VBA / SQL DB
Anybody done any work with Excel / VBA / SQL DB? Can you give me some pointers on how I could do the following all in one VBA routine: 1) From a cell variable value (ie, user enters a customer code), I query table A and put the data into a worksheet starting from say cell A1. 2) A blank row is created after the last data line in point 1 above. 3) Using the same cell variable, query table B and put the data into the worksheet starting from the row after the blank row in point 2 above. and so on. Like I've said before I work with ASP all day and know about ADO connections, commands and...

XL 2007: How to find out what keyboard shortcuts I've assigned to macros?
Over the years, I've recorded and written a lot of macros. (Probably time to take a week or two and go over them and delete at least half!) I assigned a keyboard shortcut to a lot of them. I seem to remember that before XL 2007, there was a keyboard organizer that I could go through and review what shortcuts I had already assigned to my macros. I can't find that in 2007, though. Is there an easy way to generate a list of all my keyboard assignments and what macros they go to? Ed I don't recall ever seeing any such keyboard organizer in 2007. Canned from a prev...

VBA Error Message "Compile Error...."
I used a macro from Ron's website to mail each worksheet to the email address in cell a1. I ran this macro and it worked perfectly for one workbook BUT... when I tried to use it for another workbook I got the follwing error message "Microsoft Visual Basic Compile Error Can't find project or library Ok Help". Help me please... do I have to check some more references in the VBA tools? Thanks, Steve Hi Steve Have you set the reference to Outlook in that other workbook also ? You must do that in every workbook or you can use Late binding. See my site for a example --...

Pivot tables and Macros
I was looking to be able to manipulate (ie change selections from the drop downs, not change the fields in the table or anything)and print from a pivot table using a macro. So how do I go about doing that? When I set up a macro by recording the actions that I want to do, I always get an error message when I try to run it as a macro. What specific steps are you recording, and what error message do you get? Can you click the Debug button, and see the line of code that is causing the problem? Dust For Eyes wrote: > I was looking to be able to manipulate (ie change selections from the >...

Macro changes color
Hello I have the following macro to set chart fonts to arial 10. But If I apply this macro to a chart that already has fonts colored differently (lets say some are red, some blue, some white) it changes all fonts to black. I tried to remove ColorIndex hoping i would than ignore color, but it doesn't help. How to make macro that will not change the set colors in the chart? Selection.AutoScaleFont = False With Selection.Font .Name = "Arial" .Size = 10 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont =...

VBA
Hey Folks: Anyone have suggestions on publications for the beginner VBA user? (particular author, etc.) All recommendations welcome! TIA, Sandi Hi Sandi, My suggestion would be to start with the online free Tutorials and then move up to purchasing a book. http://www.mvps.org/dmcritchie/excel/excel.htm#tutorials perhaps starting with Microsoft Excel for Windows -- Visual Basic for Applications 101 � VBA 101, meaning, of course, an introductory course in VBA [http://support.microsoft.com/support/excel/content/vba101/default.asp] Starts of with Recording Your First Macro, Runnin...

Problem with vba code to export query result in excel
Hi, I have a access report that exports to excel with click of a button after choosing parameters. This works well. However I have to modify couple of fields to utilize formula in the export module. I am not sure how to do this. I am writing the above code which seems to cause problem. I appreciate any help to resolve this issue. Thanks. Code: If lngColumn = 12 Then xlc.Offset(0, lngColumn).Value = =([UnitPrice]*[OriginalShippedQty])/1000 End If It seems the fields UnitPrice and OrigianalShippedQty are not being recognized here Jack wrote: >Hi, >I have a acces...

Create Excel macro for barcode output
I am looking for suggestions or samples of an Excel macro that will output barcodes that can be printed and then attached onto loan documents. Example: input loan # 555 and print off 20 barcoded labels - each label contains loan number + the document type. hi, you don't need a macro for that. we just got throught barcodeing our part numbers in the ware house and used excel and no macro. bar codes are just another font. excel uses 3 0f 9 barcode font. you can download others off the net. you can format a cell with this font and it will show as barcode on the sheet and numbers in th...

Macro's for figuring Price Lists?!?
I'm working on price books for the company I work for. The vendors just email us the suggested retail price in excel format. I have to put in a formula to come up with "Our Cost" and a formula for "Our Retail". The problem is - The "Suggested Retail" is in a different column on each worksheet. For example on one worksheet the "Suggested Retail" is in column "G", and on the next worksheet it is in column "H". Can a macro be created and automatically look for the suggested retail price column rather than specifying colum...

Switching Accounts on Download
To Whom Can Help: MS Money 2007 has started downloading account information into the wrong account--it is swapping it with another account. This happened in a previous version of Money and I don't know how to correct it. In the previous version it was with a Banking account--two savings accounts from the same institution. In this incarnation, it is with two investment accounts--mutual fund versus brokerage account--but from the same institution. Anyone have this happen to them...anyone know of a solution? Thanks for your help. Cheers. In microsoft.public.money, golfbum71 wrote: ...

naming a workbook from a cell (macro?)
A user wants to name a workbook the name that is entered in a particular cell. (A Purchase Order, for example). After they populate the cell, can a macro be executed to copy the cell, and paste into the save as dialog box? I've tried, but the paste doesn't work for me... We are using Excel 2003. Thanks Eric You can paste this code into the worksheet module concerned. Right-click the sheet tab and select 'view code' Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1")) Is Nothing Then ThisWorkbook.SaveAs Filename:=...

passeord Protect for excel formula and VBA code
Hi, i have excel sheet its contain lot of formula and VBA(macro) code, its for used for user purpose, i need how to protect the formula and VBA at the time of user using. kindly let me know , kindly help me out i need user password : for user can upload the data in non restriction cell, admin password : can change any thing(change power) pls help me, Please ask on the Excel board. "deen" wrote: > Hi, > > i have excel sheet its contain lot of formula and VBA(macro) code, > > its for used for user purpose, > > i need how to protect the formula and ...

VBA project locked
Hi While importing the Calender package (Calendar80.Package) i got the following error "Package contains items that cannot be imported becuase their VBA project locked" Date Dialong , Microsoft Calender control 11.0 and Rm_Analysis Report were shown as locked How to resolve this ? ...

Altering the range that is plotted by a chart via VBA
Good morning all. I haven't really done a huge amount on charting, so I'm sure you'll think that these questions are a bit simplistic, but here goes! I plot a chart from a worksheet that contains three columns of data - the X axis contains week numbers, and is in B29:B54. Actual hours are entered in F29:F24 and cumualtive hours in G29:G24. The cumulative formula is of the form: =SUM($F$29:F29) So, each week, in order to plot another week's data, I have to copy this cumulative formula down by one cell, which, considering I have a lot of these reports, is a bit time cons...

VBA macros
I have a project that has 6 macros defined with only 1 sheet which is named PTS08. I would like to run one of the macros. They all open text files. Let's suppose one of them is ADPS08.TXT. I want this file to go into a sheet called ADP. The sheet doesn't exist. How do I do this? TIA. PF. -- Posted via a free Usenet account from http://www.teranews.com Start here http://www.rondebruin.nl/txtcsv.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Pierre Fichaud" <prf51@sympatico.ca> wrote in message news:47dffa5e$0$26109$88260bb3@free.teranew...