Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to the Developer Tab.

    Developer Tab in Microsoft Excel.png
  2. Click Insert, and in the Form Controls section, click the Form Control buttonButton.

    The Insert button with the Form Controls section open. The Form Control button is selected.
  3. Click and drag in cell B1 to create a button at a size you want.

    A large button is in Cell B1 called Button 1
  4. The Assign Macro box will appear, click Cancel.

    The Assign Macro box with the cancel button in the bottom right corner.
  5. Now double click your button and type “Clear Form.”

    The button's name has been changed from Button 1 to Clear Form.

...

  1. Go to the Developer Tab and click Visual Basic.

    Visual Basic Button.png
  2. In the Visual Basic box, click Insert and choose Module.

    The Insert Tab in the Visual Basic box with Module highlighted.
  3. In the text box, type in the code for your button.

    An example of code to use for making a clear form button perform the action.
    1. In the code, it says “Are you sure you want to clear the form?” This is in the code because a person can read “Clear Form” and know what it is. But a screen reader will not be able to read the Clear Form button. Just that a button is present. This question will be read by the screen reader and will alert the reader.

    2. Be sure you made changes to the code if you need it. For example, changing the range to reach your whole form.

  4. When you click the button, the question will pop up. If you answer “Yes”, the form will be cleared. If you answer “No,” nothing will happen.

  5. Right click your button and click Assign Macro in the expansion menu.

    The button expansion with the Assign Macro option highlighted.
  6. In the pop-up Assign Macro box, click the Clear Form Macro in the Macro name and click OK.

    The Assign Macro box with a Macro called Clear Form.Image Removed

    Go back to the Developers Tab and click on the Macros button.

    The Macros button in Microsoft Excel. It looks like a grey piece of paper with a red paper to the right.Image RemovedThe Assign Macro box. The Macro Name section has the Clear Form Macro.Image Added
  7. Next, click the Macro button in the Developer Tab.

    The macros button in Microsoft Excel.Image Added
  8. In the Macro pop-up box, click the Clear Form Macro and click OK.

    The Macro box with a Macro called Clear Form. The options button is highlighted.Image Added
  9. In the pop-up box, click the Options button and change the short cut to Control + Shift + C.

    The Macro box to the left with the Options button in the bottom right corner. The Macro Options box is to the right with a short cut key set at Control Shift capital C.Image RemovedThe Macro Options box with the Macro Name as Clear Form, Short Cut Key is Ctrl Shift capital C. Description says Clears the form, all data in the cells will be erased.Image Added
    1. Clicking those buttons in that order will allow students who only use keyboards to use the macros and clear the sheet.

  10. To fulfill accessibility requirements, add instructions to cell A1 on how to use the Clear Form button.

    A complete form with a Clear Form button and instructions on how to fill out the form and how to clear the form and restart.Image Removed

To make your macros accessible, follow these steps.

  1. Each macro must have a clear and complete description of what it does.

  2. Each macro must have a clear title that indicates its function.

  3. A keyboard shortcut must be assigned to each macro.

  4. The keyboard shortcuts or “hot keys” assigned to a macro must not match an existing short cut.

  5. Users must be alerted that macros are being used in a document. They should know how many of them there are, the name, description, and hotkey of each macro.

Hot Keys Example

Instructions to adding a keyboard shortcut.

  1. Go to the Developer Tab.

    Developer Tab in Microsoft Excel.Image Removed
  2. In the Code section, click Record Macro.

    Record Macro button in Microsoft Excel.Image Removed
  3. In the Record Macro box, create a name for your macro that is meaningful to what your macro does. In the Shortcut Key, type in the key you want to activate the macro. In Store Macro in: Choose “This Workbook” or the workbook you want the macro stored in. In description, explain what your macro does.

    Record Macro box in Microsoft Excel. Short Cut key is CTRL r. Description is to replace blank cells with no data.Image Removed
  4. Click OK.

Warning

CTRL C is already used in Excel as a hot key for copying. This cannot be used for another function.

Record Macro box in Microsoft Excel. Short Cut key is Control C. Description is to replace blank cells with no data.Image Removed
Tip

CTRL R is not used for anything in Excel, so it is safe to use for a macro.

Record Macro box in Microsoft Excel. Short Cut key is CTRL r. Description is to replace blank cells with no data.Image Removed

Hot Key Description Example

...

  1. A complete form with a Clear Form button and instructions on how to fill out the form and how to clear the form and restart.Image Added

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@82d
sortmodified
showSpacefalse
reversetrue
typepage
labelskb-how-to-article
cqllabel = "kb-how-to-article" and type = "page" and space = "AN"