![]() |
Macro (attributes?)
I've created a macro (function) that works, but doesn't show up when I select
the tool-macro-visual basic editor. I have to play around in the macro toolbar to get the macro to show up. But how do I change the attributes to be able to see it all the time? |
Macro (attributes?)
For a Macro to show up you need a cople of things to be true. The sub must be
declared Public (no declared defaults to Public) Public Sub MySub() 'Good Sub MySub() 'Good Private Sub MySub() 'won't show up The sub must be placed in a regular module (such as Module1). The module may not be declared Private. Look at the top of the module for Option Private Finally the sub can not take can argument. Public Sub MySub(myVariable) 'won't show up... -- HTH... Jim Thomlinson "Brad" wrote: I've created a macro (function) that works, but doesn't show up when I select the tool-macro-visual basic editor. I have to play around in the macro toolbar to get the macro to show up. But how do I change the attributes to be able to see it all the time? |
Macro (attributes?)
Brad
In addition to Jim's information, I notice the words macro(function). If written as a function like this Function GetFormula(Cell) GetFormula = Cell.Formula End Function it will not show up in ToolsMacroMacros Look for it in FunctionsUser Defined Gord Dibben Excel MVP On Mon, 5 Dec 2005 14:14:01 -0800, "Brad" wrote: I've created a macro (function) that works, but doesn't show up when I select the tool-macro-visual basic editor. I have to play around in the macro toolbar to get the macro to show up. But how do I change the attributes to be able to see it all the time? |
Macro (attributes?)
Thank you!
"Jim Thomlinson" wrote: For a Macro to show up you need a cople of things to be true. The sub must be declared Public (no declared defaults to Public) Public Sub MySub() 'Good Sub MySub() 'Good Private Sub MySub() 'won't show up The sub must be placed in a regular module (such as Module1). The module may not be declared Private. Look at the top of the module for Option Private Finally the sub can not take can argument. Public Sub MySub(myVariable) 'won't show up... -- HTH... Jim Thomlinson "Brad" wrote: I've created a macro (function) that works, but doesn't show up when I select the tool-macro-visual basic editor. I have to play around in the macro toolbar to get the macro to show up. But how do I change the attributes to be able to see it all the time? |
Macro (attributes?)
I'm glad that you added the additional comments - That is exactly what I was
looking for - Thanks!! "Gord Dibben" wrote: Brad In addition to Jim's information, I notice the words macro(function). If written as a function like this Function GetFormula(Cell) GetFormula = Cell.Formula End Function it will not show up in ToolsMacroMacros Look for it in FunctionsUser Defined Gord Dibben Excel MVP On Mon, 5 Dec 2005 14:14:01 -0800, "Brad" wrote: I've created a macro (function) that works, but doesn't show up when I select the tool-macro-visual basic editor. I have to play around in the macro toolbar to get the macro to show up. But how do I change the attributes to be able to see it all the time? |
All times are GMT +1. The time now is 12:20 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com