F function keys (F1,F2,F3,F4,F5 etc.) can be assigned to macros with the following codes :
Sub A_1()
Call sndPlaySound32(ThisWorkbook.Path & "\a1.wav", 0)
End Sub
Sub B_1()
Call sndPlaySound32(ThisWorkbook.Path & "\b1.wav", 0)
End Sub
Sub C_1()
Call sndPlaySound32(ThisWorkbook.Path & "\c1.wav", 0)
End Sub
Sub D_1()
Call sndPlaySound32(ThisWorkbook.Path & "\d1.wav", 0)
End Sub
Sub E_1()
Call sndPlaySound32(ThisWorkbook.Path & "\e1.wav", 0)
End Sub
Sub auto_open()
Application.OnKey "{F1}", "A_1"
Application.OnKey "{F2}", "B_1"
Application.OnKey "{F3}", "C_1"
Application.OnKey "{F4}", "D_1"
Application.OnKey "{F5}", "E_1"
End Sub