You are here:

Excel/Accessing Ms Excel 2007 procedures

Advertisement


Question
QUESTION: I have created a programme in Excel which is run by a lengthy Macro. I have used a procedure which I wrote with the original programme to handle some repetitive operations. I wish to access this procedure to edit its code. I have forgotten the steps, menu Bars, Menu Options etc., to follow to access and open the code of the procedure for editing and, subsequently, saving. Can you help me, please?
Thanks in anticipation.

ANSWER: Peter Barry,



Alt+F11 will take you to the Visual Basic Editor.

If you want to use the ribbon,  you can go to the view menu and on the right end should be a macros button.  In the dropdown of that button, you can choose to view macros.  then select the macro you want and choose edit.  This only works with macros that you can run from the macro dialog.  The easiest is probably to use the Alt+F11 keys to open the visual basic editor.  

There is also a developers button that you can turn on. You would click the office button and at the bottom edge of the dialog is the Excel options button.  click that and choose popular.  In the top options shown, is a check box to enable the developer commandbutton which will make the developer tab visible and that will give you access into your macros as well.

--
Regards,
Tom Ogilvy


---------- FOLLOW-UP ----------

QUESTION: Thanks for the reply, Tom. I have followed the two alternatives- Developer and View as you advised. Each of them leads to a common list of Macros which I created as I prepared the Programme. But in this overall programme, I made a procedure call "COMBINED (Five parameters, each separated by a comma, follow). But what are the buttons to use to find the code for this procedure and hence to edit it?

Awaiting your further advice,

Answer
Peter

If you do Alt+F11 you will be taken to the visual basic editor.

On the left you will see the project explorer.  Find you workbook there.  Under your workbook/project should be a folder icon labeled macros. Expand that folder.  You should see a list of modules.  Click on each module in turn.   When the module appears on the right, at the top of the module you will see two dropdowns.  The left dropdown should say "general"  when you click on the right dropdown to expose the list you will see the list of macros in that module.  If you select the one you want, it will be brought into view.  Or you can just click in the module and scroll down until you find your macro.

A macro that has arguments does not appear in the list of macros to run since it is designed to be called from another macro.

--
Regards,
Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Tom Ogilvy

Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.