Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I add in a custom Macro/Function?

VB for apps

How do I add in a custom Macro/Function?

by  logius  Posted    (Edited  )
When using an Office product, it is sometimes necessary to create your own custom functions or macros to aid in your automation processing. To create a custom macro/function is relatively easy. Simply follow these steps:

1. Make sure you have an Office product open then
hit ALT+F11. You should see Microsoft Visual
Basic editor open in a separate window.

2. Decide where you wish to include your custom
method. If you'd like to have your macro
available everytime you open the application,
then click on the appropriate folder:
Excel: PERSONAL.XLS
Outlook: Project1
Word: Normal
If, instead, you would like to associate your
macro only with a specific file, then click on
that file.

3. Once you have selected the appropriate file,
right-click on it and select Insert>Module.
An editor screen should open up which will allow
you to type in your custom function/macro.

A few points to remember:

In order to run a custom Macro, you can hit ALT+F8 and select the macro you wish to run or you can go to Tools>Macro>Macros.

In Excel, if you wish to run a custom function, then you simply type in the function as you would any other function.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top