Sei sulla pagina 1di 6
Assigning buttons to macros Macros can be assigned to buttons or any AutoShape on the worksheet, These buttons will only show on the worksheet that you assign it to and therefore the macro will only be available to the worksheet the button is on. To assign a button: 1. Make sure the FORMS toolbar is showing (right mouse click over a toolbar that is already showing and select FORMS from the list, or VIEW, TOOLBARS, FORMS) 2. Select the BUTTON shape from the toolbar. Once you have clicked on the shape, go into the worksheet and click and drag the mouse until the desired size of the button is achieved (this can be edited later if Po coven on necessa deh tie ry) ris create aELITON 3. The ASSIGN MACRO window will immediately eae appear. Select the macro being assigned to the button from the list. Click on OK. 4. Youwill be returned to the Excel worksheet where you | * will see your button with sizing handles around it, You can change the text inside the button by dragging over the text and retyping. yornnnmmmnnmnani z Sizing handles (used é for resizing object a) To resize, hold mouse over a sizing handle and drag in or out b) To retype label drag over text, then type. If the button is not selected, select it by: + Holding down CTRL key and clicking on the button; or ‘+ Click on the button with Right Mouse button and select EDIT TEXT. NOTE: Do not use left mouse button to select the button as this runs the macro. c) To move the button, click and drag on the frame surrounding the button, avoid dragging on the sizing handles. 5. Once you click away from the button you have created, it becomes active and will run the macro assigned to it when clicked on, Assigning the macro to an AutoShape 1. Draw an AutoShape on your worksheet. 2. Format the AutoShape in any way you like €.g, borders and patterns. 3. Add descriptive text to the AutoShape (right Mouse click on the AutoShape and select ADD TEXT) ‘SAdministatvelniormation Techaalogy Gustomer Sewees Managementeauceton and Training TeariGuvent Trang Page 27 Modulos\Advanced ExcaiAavanced Excel formulas and funetone oe ight mouse click on the AutoShape and select ASSIGN MACRO (if Assign Macro is not available try clicking on the frame surrounding the AutoShape again, it should be made up of tiny dots, not diagonal lines, ee MACRO WITH MACRO WITH AUTOSHAPE coun! a Beaneueecygvouaaael CeO Ifthe frame surrounding the object is made up of

Potrebbero piacerti anche