+ Reply to Thread
Results 1 to 5 of 5

Macro (attributes?)

  1. #1
    Brad
    Guest

    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?

  2. #2
    Jim Thomlinson
    Guest

    RE: 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?


  3. #3
    Gord Dibben
    Guest

    Re: 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 Tools>Macro>Macros

    Look for it in Functions>User Defined


    Gord Dibben Excel MVP

    On Mon, 5 Dec 2005 14:14:01 -0800, "Brad" <[email protected]>
    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?


  4. #4
    Brad
    Guest

    RE: 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?


  5. #5
    Brad
    Guest

    Re: 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 Tools>Macro>Macros
    >
    > Look for it in Functions>User Defined
    >
    >
    > Gord Dibben Excel MVP
    >
    > On Mon, 5 Dec 2005 14:14:01 -0800, "Brad" <[email protected]>
    > 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?

    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1