...
Go to the Developer Tab.
Click Insert, and in the Form Controls section, click the Form Control buttonButton.
Click and drag in cell B1 to create a button at a size you want.
The Assign Macro box will appear, click Cancel.
Now double click your button and type “Clear Form.”
...
Go to the Developer Tab and click Visual Basic.
In the Visual Basic box, click Insert and choose Module.
In the text box, type in the code for your button.
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.
Be sure you made changes to the code if you need it. For example, changing the range to reach your whole form.
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.
Right click your button and click Assign Macro in the expansion menu.
In the pop-up Assign Macro box, click the Clear Form Macro in the Macro name and click OK.
Go back to the Developers Tab and click on the Macros button.
Next, click the Macro button in the Developer Tab.
In the Macro pop-up box, click the Clear Form Macro and click OK.
In the pop-up box, click the Options button and change the short cut to Control + Shift + C.
Clicking those buttons in that order will allow students who only use keyboards to use the macros and clear the sheet.
To fulfill accessibility requirements, add instructions to cell A1 on how to use the Clear Form button.
To make your macros accessible, follow these steps.
Each macro must have a clear and complete description of what it does.
Each macro must have a clear title that indicates its function.
A keyboard shortcut must be assigned to each macro.
The keyboard shortcuts or “hot keys” assigned to a macro must not match an existing short cut.
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.
Go to the Developer Tab.
In the Code section, click Record Macro.
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.
Click OK.
Warning |
---|
CTRL C is already used in Excel as a hot key for copying. This cannot be used for another function. |
Tip |
---|
CTRL R is not used for anything in Excel, so it is safe to use for a macro. |
Hot Key Description Example
...
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|