Question: I am trying to create a macro so if I press F11, it would highlight the cell yellow.

I tried the following but it doesn't seem to work when I press F11.

```
Private Sub Workbook_Open()

Application.OnKey "{F11}", "Yellow"

End Sub

Private Sub Yellow()
    With Selection.Interior
        .Color = 65535
    End With
End Sub

```

Answer: 
As you put the code of the OnKey Action into the module of `ThisWorkbook`, you have to call it like that

```
Application.OnKey "{F11}", "ThisWorkbook.Yellow"

```
The `Sub` to be called must be **in a standard module**. Or it must be called specifying the Sheet/Workbook module name, too.

```
Sub Yellow()
   Selection.Interior.Color = 65535
End Sub

```