• Assigning macros (Excel XP)

    Author
    Topic
    #421067

    I’m trying to assign a macro to a command button on a spreadsheet…however, the “Assign Macro” command does not come up in the short cut menu when I right-click the button…how come?

    Thanks,

    Christa

    Viewing 3 reply threads
    Author
    Replies
    • #955485

      Is it a command button from the Controls Toolbox?

      The assign macro is from the command button from the FORMs toolbar.

      With the control toolbox items select view code and add the code to the event you want or call the existing routine from the event (eg the click event)

      Steve

    • #955488

      Christina:

      Make sure the pointer is not inside the control box but touching the edges. On my version of Excel the pointer turns into a black line with double arrows.
      When you have the proper pointer right click and you should be able to assign you Macro.

      Hint, change Zoom To 200% or even greater so you can better control the pointer.

      Tom Duthie

    • #955490

      Thank you! That was my problem (I obviously have not done this for awhile 🙂

      Thanks again

      Christa

    • #955489

      Did you create the button from the Control Toolbox? If so, you don’t get an Assign Macro choice with those controls. If you right click on a control from the Control Toolbox when in design mode, the pop up menu should contain a “View Code” button. If you click on this, you will get a VBE window where you can either put the macro code, or a call to the macro if it is in another module, in the click event routine for the button.

      If the control is from the Forms Toolbox, then you must right click in the selection border of the button to get the “Assign Macro” button in the popup menu.

    Viewing 3 reply threads
    Reply To: Assigning macros (Excel XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: