+ Reply to Thread
Results 1 to 5 of 5

How do I Assign Macro to a button?

  1. #1
    BellExcel
    Guest

    How do I Assign Macro to a button?

    I have a problem in trying to assign a macro to a button in Excel 2002. When
    I create the button, and then click on the button, the "Assign Macro" command
    is grayed out (unavailable). I cannot figure out what's wrong.

  2. #2
    Debra Dalgleish
    Guest

    Re: How do I Assign Macro to a button?

    When you click on the button, click on its border. Around the button,
    you'll see a thick dotted border.
    (If you click inside the button, you'll see a thick border with diagonal
    lines, and you won't be able to assign a macro.)

    Right-click on the button border, and choose Assign Macro.


    BellExcel wrote:
    > I have a problem in trying to assign a macro to a button in Excel 2002. When
    > I create the button, and then click on the button, the "Assign Macro" command
    > is grayed out (unavailable). I cannot figure out what's wrong.



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


  3. #3
    BellExcel
    Guest

    Re: How do I Assign Macro to a button?

    For some reason, this does not seem to work for me. Should I be in the
    control box design mode? I would think so, but the assign macor option does
    not appear. Should I choose "Command Button Object" and then "Edit".

    "Debra Dalgleish" wrote:

    > When you click on the button, click on its border. Around the button,
    > you'll see a thick dotted border.
    > (If you click inside the button, you'll see a thick border with diagonal
    > lines, and you won't be able to assign a macro.)
    >
    > Right-click on the button border, and choose Assign Macro.
    >
    >
    > BellExcel wrote:
    > > I have a problem in trying to assign a macro to a button in Excel 2002. When
    > > I create the button, and then click on the button, the "Assign Macro" command
    > > is grayed out (unavailable). I cannot figure out what's wrong.

    >
    >
    > --
    > Debra Dalgleish
    > Excel FAQ, Tips & Book List
    > http://www.contextures.com/tiptech.html
    >
    >


  4. #4
    Debra Dalgleish
    Guest

    Re: How do I Assign Macro to a button?

    The Assign Macro command will only appear if the button is from the
    Forms toolbar.

    If you used a button from the Control toolbox, you shouldn't see Assign
    Macro in the shortcut menu. To run a macro when a button from the
    Control toolbox is clicked:

    In Design mode, double-click the button
    Where the cursor is flashing, type the name of the macro you want to
    run. For example:

    Private Sub CommandButton1_Click()
    MyMacro
    End Sub


    Close the Visual Basic Editor.



    BellExcel wrote:
    > For some reason, this does not seem to work for me. Should I be in the
    > control box design mode? I would think so, but the assign macor option does
    > not appear. Should I choose "Command Button Object" and then "Edit".
    >
    > "Debra Dalgleish" wrote:
    >
    >
    >>When you click on the button, click on its border. Around the button,
    >>you'll see a thick dotted border.
    >>(If you click inside the button, you'll see a thick border with diagonal
    >>lines, and you won't be able to assign a macro.)
    >>
    >>Right-click on the button border, and choose Assign Macro.
    >>
    >>
    >>BellExcel wrote:
    >>
    >>>I have a problem in trying to assign a macro to a button in Excel 2002. When
    >>>I create the button, and then click on the button, the "Assign Macro" command
    >>>is grayed out (unavailable). I cannot figure out what's wrong.

    >>
    >>
    >>--
    >>Debra Dalgleish
    >>Excel FAQ, Tips & Book List
    >>http://www.contextures.com/tiptech.html
    >>
    >>

    >



    --
    Debra Dalgleish
    Excel FAQ, Tips & Book List
    http://www.contextures.com/tiptech.html


  5. #5
    BellExcel
    Guest

    Re: How do I Assign Macro to a button?

    Thanks so much! Using the Forms toolbar made the difference!

    "Debra Dalgleish" wrote:

    > The Assign Macro command will only appear if the button is from the
    > Forms toolbar.
    >
    > If you used a button from the Control toolbox, you shouldn't see Assign
    > Macro in the shortcut menu. To run a macro when a button from the
    > Control toolbox is clicked:
    >
    > In Design mode, double-click the button
    > Where the cursor is flashing, type the name of the macro you want to
    > run. For example:
    >
    > Private Sub CommandButton1_Click()
    > MyMacro
    > End Sub
    >
    >
    > Close the Visual Basic Editor.
    >
    >
    >
    > BellExcel wrote:
    > > For some reason, this does not seem to work for me. Should I be in the
    > > control box design mode? I would think so, but the assign macor option does
    > > not appear. Should I choose "Command Button Object" and then "Edit".
    > >
    > > "Debra Dalgleish" wrote:
    > >
    > >
    > >>When you click on the button, click on its border. Around the button,
    > >>you'll see a thick dotted border.
    > >>(If you click inside the button, you'll see a thick border with diagonal
    > >>lines, and you won't be able to assign a macro.)
    > >>
    > >>Right-click on the button border, and choose Assign Macro.
    > >>
    > >>
    > >>BellExcel wrote:
    > >>
    > >>>I have a problem in trying to assign a macro to a button in Excel 2002. When
    > >>>I create the button, and then click on the button, the "Assign Macro" command
    > >>>is grayed out (unavailable). I cannot figure out what's wrong.
    > >>
    > >>
    > >>--
    > >>Debra Dalgleish
    > >>Excel FAQ, Tips & Book List
    > >>http://www.contextures.com/tiptech.html
    > >>
    > >>

    > >

    >
    >
    > --
    > Debra Dalgleish
    > Excel FAQ, Tips & Book List
    > http://www.contextures.com/tiptech.html
    >
    >


+ 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